diff --git a/libs/langchain/langchain/vectorstores/matching_engine.py b/libs/langchain/langchain/vectorstores/matching_engine.py index a480580a760..39f27094f1f 100644 --- a/libs/langchain/langchain/vectorstores/matching_engine.py +++ b/libs/langchain/langchain/vectorstores/matching_engine.py @@ -233,7 +233,9 @@ class MatchingEngine(VectorStore): filter = filter or [] # If the endpoint is public we use the find_neighbors function. - if self.endpoint._public_match_client: + if hasattr(self.endpoint, "_public_match_client") and ( + self.endpoint._public_match_client + ): response = self.endpoint.find_neighbors( deployed_index_id=self._get_index_id(), queries=[embedding],