From 2d23bf62efeff333a395023187bcd320d9b2ab43 Mon Sep 17 00:00:00 2001 From: Jorge Date: Tue, 12 Mar 2024 17:53:47 +0100 Subject: [PATCH] Fix typo --- .../langchain_google_vertexai/vectorstores/_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/vertexai/langchain_google_vertexai/vectorstores/_utils.py b/libs/vertexai/langchain_google_vertexai/vectorstores/_utils.py index 50141572..5538aaf1 100644 --- a/libs/vertexai/langchain_google_vertexai/vectorstores/_utils.py +++ b/libs/vertexai/langchain_google_vertexai/vectorstores/_utils.py @@ -91,24 +91,24 @@ def to_data_points( raise ValueError("All metadata keys must be strings") if isinstance(value, str): - restriction = meidx_types.IndexDataPoint.Restriction( + restriction = meidx_types.IndexDatapoint.Restriction( namespace=namespace, allow_list=[value] ) restricts.append(restriction) elif isinstance(value, list) and all( isinstance(item, str) for item in value ): - restriction = meidx_types.IndexDataPoint.Restriction( + restriction = meidx_types.IndexDatapoint.Restriction( namespace=namespace, allow_list=value ) restricts.append(restriction) elif isinstance(value, (int, float)) and not isinstance(value, bool): - restriction = meidx_types.IndexDataPoint.NumericRestriction( + restriction = meidx_types.IndexDatapoint.NumericRestriction( namespace=namespace, value_float=value ) numeric_restricts.append(restriction) - data_point = meidx_types.IndexDataPoint( + data_point = meidx_types.IndexDatapoint( datapoint_id=id_, feature_vector=embedding, restricts=restricts,