fix: reverting the lancedb chnage
This commit is contained in:
parent
b47cb7462d
commit
7b31b86f10
2 changed files with 2 additions and 3 deletions
|
|
@ -111,7 +111,8 @@ class OllamaEmbeddingEngine(EmbeddingEngine):
|
||||||
self.endpoint, json=payload, headers=headers, timeout=60.0
|
self.endpoint, json=payload, headers=headers, timeout=60.0
|
||||||
) as response:
|
) as response:
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
return data["embeddings"]
|
print(data)
|
||||||
|
return data["embeddings"][0]
|
||||||
|
|
||||||
def get_vector_size(self) -> int:
|
def get_vector_size(self) -> int:
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -182,8 +182,6 @@ class LanceDBAdapter(VectorDBInterface):
|
||||||
properties = get_own_properties(data_point)
|
properties = get_own_properties(data_point)
|
||||||
properties["id"] = str(properties["id"])
|
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))](
|
return LanceDataPoint[str, self.get_data_point_schema(type(data_point))](
|
||||||
id=str(data_point.id),
|
id=str(data_point.id),
|
||||||
vector=vector,
|
vector=vector,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue