THanks @Logan M for the response.
So when you say env var, you mean setting up the GOOGLE_APPLICATION_CREDENTIALS with the path to the json key?
So from langchain documentation (which btw works very well for me to set up that GOOGLE_APPLICATION_CREDENTIALS):
To use Vertex AI PaLM you must have the google-cloud-aiplatform Python package installed and either:
Have credentials configured for your environment (gcloud, workload identity, etc...)
Store the path to a service account JSON file as the GOOGLE_APPLICATION_CREDENTIALS environment variable
This codebase uses the google.auth library which first looks for the application credentials variable mentioned above, and then looks for system-level auth.
Surprisingly, when I try the same things with llama_index, i get the following:
google.api_core.exceptions.PermissionDenied: 403 Generative Language API has not been used in project xxxxxxx before or it is disabled.
I am using the exact same location for the json credentials for langchain and llama_index