mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-13 22:02:38 +00:00
important fix
This commit is contained in:
parent
86926ee339
commit
016388b788
5 changed files with 14 additions and 41 deletions
|
|
@ -242,7 +242,6 @@ class FaissVectorIOAdapter(OpenAIVectorStoreMixin, VectorIO, VectorStoresProtoco
|
|||
assert self.kvstore is not None
|
||||
|
||||
if vector_store_id not in self.cache:
|
||||
logger.warning(f"Vector DB {vector_store_id} not found")
|
||||
return
|
||||
|
||||
await self.cache[vector_store_id].index.delete()
|
||||
|
|
|
|||
|
|
@ -443,7 +443,6 @@ class SQLiteVecVectorIOAdapter(OpenAIVectorStoreMixin, VectorIO, VectorStoresPro
|
|||
|
||||
async def unregister_vector_store(self, vector_store_id: str) -> None:
|
||||
if vector_store_id not in self.cache:
|
||||
logger.warning(f"Vector DB {vector_store_id} not found")
|
||||
return
|
||||
await self.cache[vector_store_id].index.delete()
|
||||
del self.cache[vector_store_id]
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ class OpenAIVectorStoreMixin(ABC):
|
|||
@abstractmethod
|
||||
async def insert_chunks(
|
||||
self,
|
||||
vector_store_id: str,
|
||||
vector_db_id: str,
|
||||
chunks: list[Chunk],
|
||||
ttl_seconds: int | None = None,
|
||||
) -> None:
|
||||
|
|
@ -342,7 +342,7 @@ class OpenAIVectorStoreMixin(ABC):
|
|||
|
||||
@abstractmethod
|
||||
async def query_chunks(
|
||||
self, vector_store_id: str, query: Any, params: dict[str, Any] | None = None
|
||||
self, vector_db_id: str, query: Any, params: dict[str, Any] | None = None
|
||||
) -> QueryChunksResponse:
|
||||
"""Query chunks from a vector database (provider-specific implementation)."""
|
||||
pass
|
||||
|
|
@ -619,7 +619,7 @@ class OpenAIVectorStoreMixin(ABC):
|
|||
# TODO: Add support for ranking_options.ranker
|
||||
|
||||
response = await self.query_chunks(
|
||||
vector_store_id=vector_store_id,
|
||||
vector_db_id=vector_store_id,
|
||||
query=search_query,
|
||||
params=params,
|
||||
)
|
||||
|
|
@ -813,7 +813,7 @@ class OpenAIVectorStoreMixin(ABC):
|
|||
)
|
||||
else:
|
||||
await self.insert_chunks(
|
||||
vector_store_id=vector_store_id,
|
||||
vector_db_id=vector_store_id,
|
||||
chunks=chunks,
|
||||
)
|
||||
vector_store_file_object.status = "completed"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue