mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +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:
|
def save(self, documents: list[str]) -> None:
|
||||||
|
if not documents:
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = self._get_client()
|
client = self._get_client()
|
||||||
collection_name = (
|
collection_name = (
|
||||||
@@ -177,6 +180,9 @@ class KnowledgeStorage(BaseKnowledgeStorage):
|
|||||||
Args:
|
Args:
|
||||||
documents: List of document strings to save.
|
documents: List of document strings to save.
|
||||||
"""
|
"""
|
||||||
|
if not documents:
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = self._get_client()
|
client = self._get_client()
|
||||||
collection_name = (
|
collection_name = (
|
||||||
|
|||||||
Reference in New Issue
Block a user