Hi,
It seems that for some obscure reason I can enable the genrative AI API in a paid GCP project, but API-KEY says:
error: Uncaught (in promise) Error: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent: [400 Bad Request] User location is not supported for the API use.
Why is the netherlands not supported?, I can access the model via Vertex-AI with python on my local machine (using my local login credentials)
This. is hampering the use of langchain js in a project I am investigating, which requires the use of API_KEY.
So the question in the end is why is the location Netherlands not suported?
Solved! Go to Solution.
Same thing happening in Melbourne Australia
same issue also Frankfurt, DE
Same thing happening in Melbourne Australia
what was the solution?
Ok Solved it:
- Create a service account with predict endpoint and proper roles to interact with VertexAI
- use
from langchain_google_vertexai import ChatVertexAI
and it works, make sure the CloudRun runs under mentioned service account
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |