refac: retain metadata for collection
This commit is contained in:
1 parent
4ca870bf6d
commit
1f9b5b6456
3 files changed
+73
-31
No files matched your search
@@ -70,10 +70,9 @@ class ChromaClient:
|
||||
return None
|
||||
|
||||
def query(
|
||||
self, collection_name: str, filter: dict, limit: int = 2
|
||||
self, collection_name: str, filter: dict, limit: Optional[int] = None
|
||||
) -> Optional[GetResult]:
|
||||
# Query the items from the collection based on the filter.
|
||||
|
||||
try:
|
||||
collection = self.client.get_collection(name=collection_name)
|
||||
if collection:
|
||||
@@ -82,8 +81,6 @@ class ChromaClient:
|
||||
limit=limit,
|
||||
)
|
||||
|
||||
print(result)
|
||||
|
||||
return GetResult(
|
||||
**{
|
||||
"ids": [result["ids"]],
|
||||
|
||||
Reference in new issue
Block a user