feat: fix azure embedding Too many inputs problem (#530)

This commit is contained in:
John Wang 2023-07-07 11:17:36 +08:00 committed by GitHub
parent 11baff6740
commit 6eee7cb42c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,7 @@ class AzureProvider(BaseProvider):
config['openai_api_type'] = 'azure'
if model_id == 'text-embedding-ada-002':
config['deployment'] = model_id.replace('.', '') if model_id else None
config['chunk_size'] = 1
else:
config['deployment_name'] = model_id.replace('.', '') if model_id else None
return config