From 617acef2148577d243935631186df9017471cf39 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 11 Dec 2023 17:27:16 -0300 Subject: [PATCH] Fix ValueError in ChromaComponent --- src/backend/langflow/components/vectorstores/Chroma.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/langflow/components/vectorstores/Chroma.py b/src/backend/langflow/components/vectorstores/Chroma.py index 4f51b64d9..bf1273c43 100644 --- a/src/backend/langflow/components/vectorstores/Chroma.py +++ b/src/backend/langflow/components/vectorstores/Chroma.py @@ -96,9 +96,7 @@ class ChromaComponent(CustomComponent): # If documents, then we need to create a Chroma instance using .from_documents if documents is not None and embedding is not None: if len(documents) == 0: - raise ValueError( - "If documents are provided, there must be at" " least one document. Got {len(documents)}." - ) + raise ValueError("If documents are provided, there must be at least one document.") return Chroma.from_documents( documents=documents, # type: ignore persist_directory=persist_directory if persist else None,