Ed
09/16/2023, 11:31 PMnum_of_documents
def get_num_documents_from_metadata(self, collection_name):
"""
Fetches the number of documents in a collection using the collection metadata.
"""
collection_metadata = self.client.collections[collection_name].retrieve()
# pprint(collection_metadata)
return collection_metadata["num_documents"]