Fix ollama embedding func ruturn data type bugs

This commit is contained in:
yangdx
2025-04-21 00:01:25 +08:00
parent 21f5a3923e
commit 99522a088d

View File

@@ -129,4 +129,4 @@ async def ollama_embed(texts: list[str], embed_model, **kwargs) -> np.ndarray:
kwargs["headers"] = headers kwargs["headers"] = headers
ollama_client = ollama.Client(**kwargs) ollama_client = ollama.Client(**kwargs)
data = ollama_client.embed(model=embed_model, input=texts) data = ollama_client.embed(model=embed_model, input=texts)
return data["embeddings"] return np.array(data["embeddings"])