Merge pull request #2 from chinu0609/fix-for-newer-version-ollama

Fix for newer version ollama
This commit is contained in:
Chinmay Bhosale 2025-10-22 20:59:26 +05:30 committed by GitHub
commit 18c45acff0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View file

@ -111,7 +111,7 @@ class OllamaEmbeddingEngine(EmbeddingEngine):
self.endpoint, json=payload, headers=headers, timeout=60.0
) as response:
data = await response.json()
return data["embeddings"]
return data["embeddings"][0]
def get_vector_size(self) -> int:
"""

View file

@ -182,8 +182,6 @@ class LanceDBAdapter(VectorDBInterface):
properties = get_own_properties(data_point)
properties["id"] = str(properties["id"])
if isinstance(vector, list) and len(vector) == 1 and isinstance(vector[0], list):
vector = vector[0]
return LanceDataPoint[str, self.get_data_point_schema(type(data_point))](
id=str(data_point.id),
vector=vector,