hey guys how to use vertex ai with llama index, i have service account json file path stored in path (mac env) as GOOGLE_APPLICATION_CREDENTIALS, what else i should configure, still i get this error
PermissionDenied: 403 Request had insufficient authentication scopes. [reason: "ACCESS_TOKEN_SCOPE_INSUFFICIENT"
domain: "googleapis.com"
metadata {
key: "service"
value: "aiplatform.googleapis.com"
}
metadata {
key: "method"
value: "google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel"
}
for the code
import vertexai
from google.cloud import aiplatform
from vertexai import preview
project_id = "project-id"
location = "us-central1"
vertexai.init(project=project_id, location=location)
aiplatform.init(
# your Google Cloud Project ID or number
# environment default used is not set
project=project_id,
# the Vertex AI region you will use
# defaults to us-central1
location=location,
# Google Cloud Storage bucket in same region as location
# used to stage artifacts
# staging_bucket='gs://my_staging_bucket',
# custom google.auth.credentials.Credentials
# environment default credentials used if not set
# credentials=my_credentials,
# customer managed encryption key resource name
# will be applied to all Vertex AI resources if set
# encryption_spec_key_name=my_encryption_key_name,
# the name of the experiment to use to track
# logged metrics and parameters
# experiment='my-experiment',
# description of the experiment above
# experiment_description='my experiment description'
)
above code i have initialised the gcp
when i ran this code
from llama_index.llms.vertex import Vertex
llm = Vertex(model="text-bison", temperature=0, additional_kwargs={})
llm.complete("Hello this is a sample text").text
help me out
@everyone