Skip to content

Commit

Permalink
ChromaDB error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shjunn committed Nov 1, 2024
1 parent 33d4455 commit 4d345dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/community/langchain_community/vectorstores/chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def update_documents(self, ids: List[str], documents: List[Document]) -> None:
embeddings = self._embedding_function.embed_documents(text)

if hasattr(
self._collection._client, "max_batch_size"
self._collection._client, "get_max_batch_size"
): # for Chroma 0.4.10 and above
from chromadb.utils.batch_utils import create_batches

Expand Down Expand Up @@ -824,7 +824,7 @@ def from_texts(
ids = [str(uuid.uuid4()) for _ in texts]
if hasattr(
chroma_collection._client, # type: ignore[has-type]
"max_batch_size", # type: ignore[has-type]
"get_max_batch_size", # type: ignore[has-type]
): # for Chroma 0.4.10 and above
from chromadb.utils.batch_utils import create_batches

Expand Down

0 comments on commit 4d345dc

Please sign in to comment.