langchain-ai / langchain-google

MIT License
74 stars 78 forks source link

Support private_service_connect_ip_address on VectorSearchVectorStore for langchain_google_vertexai #273

Closed caetano-colin closed 3 weeks ago

caetano-colin commented 4 weeks ago

While running some notebooks I faced some issues when using Private Service Connect with the VectorSearchVectorStore object.

vectorstore_test_issue = VectorSearchVectorStore.from_components(
    project_id=PROJECT_ID,
    region=LOCATION,
    gcs_bucket_name=GCS_BUCKET,
    index_id=index.name,
    endpoint_id=index_endpoint.name,
    embedding=VertexAIEmbeddings(model_name="textembedding-gecko@003"),
    private_service_connect_ip_address="10.10.10.5",
)

print(vectorstore_test_issue._searcher._endpoint.private_service_connect_ip_address)

This outputs "None", so, as a workaround I have to manually set the IP address by doing the following:

vectorstore_test_issue._searcher._endpoint.private_service_connect_ip_address = "10.10.10.5"

Here is my current package version:

Name: langchain-google-vertexai
Version: 1.0.4

I

lkuligin commented 3 weeks ago

please, upgrade the version of the SDK to 1.0.5, it has been added recently