community[patch]: Correct type annotation for azure_ad_token_provider Closed: #14402 (#14432)

Description
Fix https://github.com/langchain-ai/langchain/issues/14402, Similar
changes: https://github.com/langchain-ai/langchain/pull/14166

Twitter handle
[lin_bob57617](https://twitter.com/lin_bob57617)
pull/14686/head
Bob Lin 7 months ago committed by GitHub
parent 8a4162d15e
commit dce3c74905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,7 @@ from __future__ import annotations
import os
import warnings
from typing import Dict, Optional, Union
from typing import Callable, Dict, Optional, Union
from langchain_core.pydantic_v1 import Field, root_validator
from langchain_core.utils import get_from_dict_or_env
@ -38,7 +38,7 @@ class AzureOpenAIEmbeddings(OpenAIEmbeddings):
For more:
https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id.
""" # noqa: E501
azure_ad_token_provider: Union[str, None] = None
azure_ad_token_provider: Union[Callable[[], str], None] = None
"""A function that returns an Azure Active Directory token.
Will be invoked on every request.

Loading…
Cancel
Save