Add logging for query parameters in NanoVectorDBStorage.query

This commit is contained in:
yangdx
2025-01-29 21:36:31 +08:00
parent 7ff8c7b9d8
commit c8b890547a

View File

@@ -137,6 +137,7 @@ class NanoVectorDBStorage(BaseVectorStorage):
async def query(self, query: str, top_k=5): async def query(self, query: str, top_k=5):
embedding = await self.embedding_func([query]) embedding = await self.embedding_func([query])
embedding = embedding[0] embedding = embedding[0]
logger.info(f"Query: {query}, top_k: {top_k}, cosine_better_than_threshold: {self.cosine_better_than_threshold}")
results = self._client.query( results = self._client.query(
query=embedding, query=embedding,
top_k=top_k, top_k=top_k,