mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-16 10:42:38 +00:00
chore: review update with score_threshold
This commit is contained in:
parent
d1bef44e2b
commit
bc27046f36
6 changed files with 24 additions and 13 deletions
|
|
@ -91,7 +91,9 @@ class PGVectorIndex(EmbeddingIndex):
|
|||
)
|
||||
execute_values(self.cursor, query, values, template="(%s, %s, %s::vector)")
|
||||
|
||||
async def query(self, embedding: NDArray, k: int) -> QueryDocumentsResponse:
|
||||
async def query(
|
||||
self, embedding: NDArray, k: int, score_threshold: float
|
||||
) -> QueryDocumentsResponse:
|
||||
self.cursor.execute(
|
||||
f"""
|
||||
SELECT document, embedding <-> %s::vector AS distance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue