mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 21:43:44 +00:00
all: test 3.13 ci (#27197)
Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,7 @@ from langchain_community.utils.openai import is_openai_v1
|
||||
removal="1.0",
|
||||
alternative_import="langchain_openai.AzureOpenAIEmbeddings",
|
||||
)
|
||||
class AzureOpenAIEmbeddings(OpenAIEmbeddings):
|
||||
class AzureOpenAIEmbeddings(OpenAIEmbeddings): # type: ignore[override]
|
||||
"""`Azure OpenAI` Embeddings API."""
|
||||
|
||||
azure_endpoint: Union[str, None] = None
|
||||
@@ -167,16 +167,16 @@ class AzureOpenAIEmbeddings(OpenAIEmbeddings):
|
||||
"default_query": self.default_query,
|
||||
"http_client": self.http_client,
|
||||
}
|
||||
self.client = openai.AzureOpenAI(**client_params).embeddings
|
||||
self.client = openai.AzureOpenAI(**client_params).embeddings # type: ignore[arg-type, arg-type, arg-type, arg-type, arg-type, arg-type, arg-type, arg-type, arg-type]
|
||||
|
||||
if self.azure_ad_async_token_provider:
|
||||
client_params["azure_ad_token_provider"] = (
|
||||
self.azure_ad_async_token_provider
|
||||
)
|
||||
|
||||
self.async_client = openai.AsyncAzureOpenAI(**client_params).embeddings
|
||||
self.async_client = openai.AsyncAzureOpenAI(**client_params).embeddings # type: ignore[arg-type, arg-type, arg-type, arg-type, arg-type, arg-type, arg-type, arg-type, arg-type]
|
||||
else:
|
||||
self.client = openai.Embedding
|
||||
self.client = openai.Embedding # type: ignore[attr-defined]
|
||||
return self
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user