Fix ollama embedding func ruturn data type bugs
This commit is contained in:
@@ -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"])
|
||||||
|
Reference in New Issue
Block a user