feat: add count to get document count in vector db (#164)
This commit is contained in:
@@ -298,6 +298,14 @@ class EmbedChain:
|
||||
prompt = self.generate_prompt(input_query, context)
|
||||
return prompt
|
||||
|
||||
def count(self):
|
||||
"""
|
||||
Count the number of embeddings.
|
||||
|
||||
:return: The number of embeddings.
|
||||
"""
|
||||
return self.collection.count()
|
||||
|
||||
|
||||
def reset(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user