Fix ValueError in ChromaComponent
This commit is contained in:
parent
8432d15482
commit
617acef214
1 changed files with 1 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue