Fix Azure OpenAI embedding model parameter fallback
- Use model param if provided - Fall back to deployment name - Fix embedding API call - Improve parameter handling
This commit is contained in:
parent
cc78e2df10
commit
46ce6d9a13
1 changed files with 1 additions and 1 deletions
|
|
@ -172,6 +172,6 @@ async def azure_openai_embed(
|
|||
)
|
||||
|
||||
response = await openai_async_client.embeddings.create(
|
||||
model=deployment, input=texts, encoding_format="float"
|
||||
model=model or deployment, input=texts, encoding_format="float"
|
||||
)
|
||||
return np.array([dp.embedding for dp in response.data])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue