mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-25 04:23:05 +00:00
(Chroma): Small Fix in add_texts
when checking for embeddings (#29766)
- **Description:** Small fix in `add_texts` to make embedding nullability is checked properly. - **Issue:** #29765 --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
parent
716fd89d8e
commit
2310847c0f
@ -547,7 +547,9 @@ class Chroma(VectorStore):
|
||||
metadatas = [metadatas[idx] for idx in non_empty_ids]
|
||||
texts_with_metadatas = [texts[idx] for idx in non_empty_ids]
|
||||
embeddings_with_metadatas = (
|
||||
[embeddings[idx] for idx in non_empty_ids] if embeddings else None
|
||||
[embeddings[idx] for idx in non_empty_ids]
|
||||
if embeddings is not None
|
||||
else None
|
||||
)
|
||||
ids_with_metadata = [ids[idx] for idx in non_empty_ids]
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user