fix: azure embedding model credentials include base_model_name is invalid for openai sdk (#917)

This commit is contained in:
takatost 2023-08-19 16:24:18 +08:00 committed by GitHub
parent 5163dd38e5
commit 1c552ff23a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,8 @@ class AzureOpenAIEmbedding(BaseEmbedding):
openai_api_version=AZURE_OPENAI_API_VERSION,
chunk_size=16,
max_retries=1,
**self.credentials
openai_api_key=self.credentials.get('openai_api_key'),
openai_api_base=self.credentials.get('openai_api_base')
)
super().__init__(model_provider, client, name)