fix remaining mypy errors in LanceDBAdapter

This commit is contained in:
Daulet Amirkhanov 2025-09-11 14:14:06 +01:00
parent 5f4c06efd1
commit 85e5b4d811

View file

@ -44,7 +44,7 @@ class IndexSchema(DataPoint):
to include 'text'. to include 'text'.
""" """
id: str id: UUID
text: str text: str
metadata: MetaData = {"index_fields": ["text"], "type": "IndexSchema"} metadata: MetaData = {"index_fields": ["text"], "type": "IndexSchema"}
@ -311,7 +311,7 @@ class LanceDBAdapter(VectorDBInterface):
f"{index_name}_{index_property_name}", f"{index_name}_{index_property_name}",
[ [
IndexSchema( IndexSchema(
id=str(data_point.id), id=data_point.id,
text=getattr(data_point, data_point.metadata["index_fields"][0]), text=getattr(data_point, data_point.metadata["index_fields"][0]),
) )
for data_point in data_points for data_point in data_points