mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-07 20:15:40 +00:00
partners[milvus]: fix issue when metadata_schema is None (#25836)
fix issue when metadata_schema is None Signed-off-by: ChengZi <chen.zhang@zilliz.com>
This commit is contained in:
parent
426333ff6f
commit
37f5ba416e
@ -475,7 +475,8 @@ class Milvus(VectorStore):
|
|||||||
raise ValueError(f"Metadata key {key} is reserved.")
|
raise ValueError(f"Metadata key {key} is reserved.")
|
||||||
# Infer the corresponding datatype of the metadata
|
# Infer the corresponding datatype of the metadata
|
||||||
if (
|
if (
|
||||||
key in self.metadata_schema # type: ignore
|
self.metadata_schema
|
||||||
|
and key in self.metadata_schema # type: ignore
|
||||||
and "dtype" in self.metadata_schema[key] # type: ignore
|
and "dtype" in self.metadata_schema[key] # type: ignore
|
||||||
):
|
):
|
||||||
kwargs = self.metadata_schema[key].get("kwargs", {}) # type: ignore
|
kwargs = self.metadata_schema[key].get("kwargs", {}) # type: ignore
|
||||||
|
Loading…
Reference in New Issue
Block a user