mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-14 08:56:27 +00:00
small fix matching engine AttributeError - object has no attribute (#13763)
This PR is fixing an attributeError: object endpoint has no attribute "_public_match_client" when using gcp matching engine with private VPC network. @baskaryan, @eyurtsev, @hwchase17. --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
parent
750485eaa8
commit
6463d2d0bd
@ -233,7 +233,9 @@ class MatchingEngine(VectorStore):
|
|||||||
filter = filter or []
|
filter = filter or []
|
||||||
|
|
||||||
# If the endpoint is public we use the find_neighbors function.
|
# 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(
|
response = self.endpoint.find_neighbors(
|
||||||
deployed_index_id=self._get_index_id(),
|
deployed_index_id=self._get_index_id(),
|
||||||
queries=[embedding],
|
queries=[embedding],
|
||||||
|
Loading…
Reference in New Issue
Block a user