mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 15:03:21 +00:00
community[patch]: Fix Milvus add texts when ids=None (#17021)
- **Description:** Fix Milvus add texts when ids=None (auto_id=True) Signed-off-by: Jael Gu <mengjia.gu@zilliz.com> Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
@@ -583,7 +583,9 @@ class Milvus(VectorStore):
|
|||||||
# Grab end index
|
# Grab end index
|
||||||
end = min(i + batch_size, total_count)
|
end = min(i + batch_size, total_count)
|
||||||
# Convert dict to list of lists batch for insertion
|
# Convert dict to list of lists batch for insertion
|
||||||
insert_list = [insert_dict[x][i:end] for x in self.fields]
|
insert_list = [
|
||||||
|
insert_dict[x][i:end] for x in self.fields if x in insert_dict
|
||||||
|
]
|
||||||
# Insert into the collection.
|
# Insert into the collection.
|
||||||
try:
|
try:
|
||||||
res: Collection
|
res: Collection
|
||||||
|
Reference in New Issue
Block a user