mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 14:08:00 +00:00
add delete_chunk feature at chroma
This commit is contained in:
parent
7f834339ba
commit
554c78ba66
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,7 @@ from typing import Any
|
|||
from urllib.parse import urlparse
|
||||
|
||||
import chromadb
|
||||
from chromadb.api.models.AsyncCollection import AsyncCollection
|
||||
from numpy.typing import NDArray
|
||||
|
||||
from llama_stack.apis.files import Files
|
||||
|
@ -116,7 +117,10 @@ class ChromaIndex(EmbeddingIndex):
|
|||
raise NotImplementedError("Keyword search is not supported in Chroma")
|
||||
|
||||
async def delete_chunk(self, chunk_id: str) -> None:
|
||||
raise NotImplementedError("delete_chunk is not supported in Chroma")
|
||||
if isinstance(self.collection, AsyncCollection):
|
||||
await self.collection.delete([chunk_id])
|
||||
else:
|
||||
self.collection.delete([chunk_id])
|
||||
|
||||
async def query_hybrid(
|
||||
self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue