The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Correct type annotation for azure_ad_token_provider Closed: #14402 (#14432)
Bob Lindce3c74905ce
diff --git a/libs/community/langchain_community/embeddings/azure_openai.py b/libs/community/langchain_community/embeddings/azure_openai.pyindex 409a738de8..42dcc54a89 100644--- a/libs/community/langchain_community/embeddings/azure_openai.py+++ b/libs/community/langchain_community/embeddings/azure_openai.py@@ -3,7 +3,7 @@ from __future__ import annotationsimport osimport warnings-from typing import Dict, Optional, Union+from typing import Callable, Dict, Optional, Unionfrom langchain_core.pydantic_v1 import Field, root_validatorfrom 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.