This commit is contained in:
Sumanth Kamenani 2025-10-03 05:04:54 -07:00 committed by GitHub
commit f7cf325690
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 44 additions and 5 deletions

View file

@ -5,6 +5,7 @@
# the root directory of this source tree.
import asyncio
import logging # allow-direct-logging
import uuid
from typing import Any
@ -101,11 +102,14 @@ class VectorIORouter(VectorIO):
chunks: list[Chunk],
ttl_seconds: int | None = None,
) -> None:
logger.debug(
f"VectorIORouter.insert_chunks: {vector_db_id}, {len(chunks)} chunks, ttl_seconds={ttl_seconds}, chunk_ids={[chunk.metadata['document_id'] for chunk in chunks[:3]]}{' and more...' if len(chunks) > 3 else ''}",
)
if logger.isEnabledFor(logging.DEBUG):
doc_ids = [chunk.document_id for chunk in chunks[:3]]
logger.debug(
f"VectorIORouter.insert_chunks: {vector_db_id}, {len(chunks)} chunks, "
f"ttl_seconds={ttl_seconds}, chunk_ids={doc_ids}{' and more...' if len(chunks) > 3 else ''}"
)
provider = await self.routing_table.get_provider_impl(vector_db_id)
return await provider.insert_chunks(vector_db_id, chunks, ttl_seconds)
await provider.insert_chunks(vector_db_id, chunks, ttl_seconds)
async def query_chunks(
self,