mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-11 18:16:12 +00:00
community[patch]: clean warning when delete by ids (#19301)
* Description: rearrange to avoid variable overwrite, which cause warning always. * Issue: N/A * Dependencies: N/A
This commit is contained in:
parent
d5415dbd68
commit
e65dc4b95b
@ -933,11 +933,11 @@ class Milvus(VectorStore):
|
|||||||
kwargs: Other parameters in Milvus delete api.
|
kwargs: Other parameters in Milvus delete api.
|
||||||
"""
|
"""
|
||||||
if isinstance(ids, list) and len(ids) > 0:
|
if isinstance(ids, list) and len(ids) > 0:
|
||||||
expr = f"{self._primary_field} in {ids}"
|
|
||||||
if expr is not None:
|
if expr is not None:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Both ids and expr are provided. " "Ignore expr and delete by ids."
|
"Both ids and expr are provided. " "Ignore expr and delete by ids."
|
||||||
)
|
)
|
||||||
|
expr = f"{self._primary_field} in {ids}"
|
||||||
else:
|
else:
|
||||||
assert isinstance(
|
assert isinstance(
|
||||||
expr, str
|
expr, str
|
||||||
|
Loading…
Reference in New Issue
Block a user