Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error trying to create a Vectorstore table #127

Closed
gitsathish opened this issue May 3, 2024 · 4 comments
Closed

Error trying to create a Vectorstore table #127

gitsathish opened this issue May 3, 2024 · 4 comments
Assignees
Labels
api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@gitsathish
Copy link

Not able to create a vectorstore,
from langchain_google_alloydb_pg import AlloyDBEngine

engine = await AlloyDBEngine.afrom_instance(
project_id=PROJECT_ID,
region=REGION,
cluster=CLUSTER,
instance=INSTANCE,
database=DATABASE,
)

await engine.ainit_vectorstore_table(
table_name=TABLE_NAME,
vector_size=768, # Vector size for VertexAI model(textembedding-gecko@latest)
)

My params are correct for project,region,cluster,instance and database.

I am getting a 404 back, appreciate any insights.

ClientResponseError: 404, message='Not Found', url=URL('https://alloydb.googleapis.com/v1beta/projects/XXXX/locations/us-east4/clusters/XXXXX/instances/XXXX/connectionInfo')

@product-auto-label product-auto-label bot added the api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. label May 3, 2024
@averikitsch
Copy link
Collaborator

Hi @gitsathish, Is your AlloyDB Cluster have a public or private IP address? To be able to connect from outside a VPC network you need to enable Public IP, see instructions https://cloud.google.com/alloydb/docs/connect-public-ip. The integration defaults to using public IP. If you are using private IP from that is deploy into your VPC network, then you will need to pass in ip_type="PRIVATE" into the AlloyDBEngine.

@averikitsch averikitsch added type: question Request for information or clarification. Not an issue. priority: p2 Moderately-important priority. Fix may not be included in next release. labels May 6, 2024
@averikitsch averikitsch self-assigned this May 6, 2024
@gitsathish
Copy link
Author

Trying to connect from a user managed notebook in the using the same VPC as alloydb. Still getting the same error,

engine = await AlloyDBEngine.afrom_instance(
project_id=PROJECT_ID,
region=REGION,
cluster=CLUSTER,
instance=INSTANCE,
database=DATABASE,
ip_type="PRIVATE"
)

@averikitsch
Copy link
Collaborator

I can reproduce the 404 error if the database or cluster fields are incorrect. Can you use the code snippet https://gist.github.com/jackwotherspoon/8a9af3ac1e60e493d32364b3931c6feb to test if you can connect to the Private IP address from your notebook?

@averikitsch
Copy link
Collaborator

Please reopen this issue if you continue to experience this issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants