openai[patch]: add back azure embeddings api_version alias (#26003)

This commit is contained in:
Bagatur 2024-09-03 17:27:10 -07:00 committed by GitHub
commit 34fc00aff1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,7 +125,8 @@ class AzureOpenAIEmbeddings(OpenAIEmbeddings):
)
"""Automatically inferred from env var `AZURE_OPENAI_API_KEY` if not provided."""
openai_api_version: Optional[str] = Field(
default_factory=from_env("OPENAI_API_VERSION", default="2023-05-15")
default_factory=from_env("OPENAI_API_VERSION", default="2023-05-15"),
alias="api_version",
)
"""Automatically inferred from env var `OPENAI_API_VERSION` if not provided.