fix: elastic search (#600)
This commit is contained in:
@@ -87,7 +87,7 @@ class ChromaDB(BaseVectorDB):
|
||||
)
|
||||
return self.collection
|
||||
|
||||
def get(self, ids=None, where=None, limit=None):
|
||||
def get(self, ids: Optional[List[str]] = None, where: Optional[Dict[str, any]] = None, limit: Optional[int] = None):
|
||||
"""
|
||||
Get existing doc ids present in vector database
|
||||
|
||||
@@ -95,6 +95,8 @@ class ChromaDB(BaseVectorDB):
|
||||
:type ids: List[str]
|
||||
:param where: Optional. to filter data
|
||||
:type where: Dict[str, Any]
|
||||
:param limit: Optional. maximum number of documents
|
||||
:type limit: Optional[int]
|
||||
:return: Existing documents.
|
||||
:rtype: List[str]
|
||||
"""
|
||||
@@ -180,6 +182,8 @@ class ChromaDB(BaseVectorDB):
|
||||
:param name: Name of the collection.
|
||||
:type name: str
|
||||
"""
|
||||
if not isinstance(name, str):
|
||||
raise TypeError("Collection name must be a string")
|
||||
self.config.collection_name = name
|
||||
self._get_or_create_collection(self.config.collection_name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user