mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-26 16:48:13 +00:00
fix: ensure doc list is not empty
This commit is contained in:
@@ -99,6 +99,9 @@ class KnowledgeStorage(BaseKnowledgeStorage):
|
||||
)
|
||||
|
||||
def save(self, documents: list[str]) -> None:
|
||||
if not documents:
|
||||
return
|
||||
|
||||
try:
|
||||
client = self._get_client()
|
||||
collection_name = (
|
||||
@@ -177,6 +180,9 @@ class KnowledgeStorage(BaseKnowledgeStorage):
|
||||
Args:
|
||||
documents: List of document strings to save.
|
||||
"""
|
||||
if not documents:
|
||||
return
|
||||
|
||||
try:
|
||||
client = self._get_client()
|
||||
collection_name = (
|
||||
|
||||
Reference in New Issue
Block a user