refactor: Handle embedding case in data
This commit is contained in:
parent
12d5a7d61c
commit
3a6bb778e2
1 changed files with 2 additions and 0 deletions
|
|
@ -124,6 +124,8 @@ class OllamaEmbeddingEngine(EmbeddingEngine):
|
|||
data = await response.json()
|
||||
if "embeddings" in data:
|
||||
return data["embeddings"][0]
|
||||
if "embedding" in data:
|
||||
return data["embedding"]
|
||||
else:
|
||||
return data["data"][0]["embedding"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue