Skip to content

Commit

Permalink
community[patch]: Correct type annotation for azure_ad_token_provider C…
Browse files Browse the repository at this point in the history
…losed: #14402 (#14432)

Description
Fix #14402, Similar
changes: #14166

Twitter handle
[lin_bob57617](https://twitter.com/lin_bob57617)
  • Loading branch information
169 authored Dec 13, 2023
1 parent 8a4162d commit dce3c74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/community/langchain_community/embeddings/azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit dce3c74

Please sign in to comment.