Skip to content

Commit

Permalink
fix LanceDB retrieval (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Nov 10, 2023
1 parent dc497ef commit 8d14f87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ragna/source_storages/_lancedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ def retrieve(
# retrieving to few sources and needed to query again.
limit = int(num_tokens * 2 / chunk_size)
results = (
table.search(vector_column_name=self._VECTOR_COLUMN_NAME)
table.search(
self._embedding_function([prompt])[0],
vector_column_name=self._VECTOR_COLUMN_NAME,
)
.limit(limit)
.to_arrow()
)
Expand Down

0 comments on commit 8d14f87

Please sign in to comment.