Skip to content

Commit

Permalink
style:mypy fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aries-ckt committed May 9, 2024
1 parent 6939cc1 commit 1e57e8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbgpt/storage/vector_store/chroma_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, vector_store_config: ChromaVectorConfig) -> None:
# client_settings=chroma_settings,
client=client,
collection_metadata=collection_metadata,
)
) # type: ignore

def similar_search(
self, text, topk, filters: Optional[MetadataFilters] = None
Expand Down
6 changes: 4 additions & 2 deletions dbgpt/storage/vector_store/pgvector_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def load_document(self, chunks: List[Chunk]) -> List[str]:
List[str]: chunk ids.
"""
lc_documents = [Chunk.chunk2langchain(chunk) for chunk in chunks]
return self.vector_store_client.from_documents(lc_documents)
self.vector_store_client.from_documents(lc_documents)
return [str(chunk.chunk_id) for chunk in lc_documents]

def delete_vector_name(self, vector_name: str):
"""Delete vector by name.
Expand All @@ -109,4 +110,5 @@ def delete_by_ids(self, ids: str):
Args:
ids(str): vector ids, separated by comma.
"""
return self.vector_store_client.delete(ids)
delete_ids = ids.split(",")
return self.vector_store_client.delete(delete_ids)

0 comments on commit 1e57e8a

Please sign in to comment.