I am using weaviate running through docker with following docker-compose setupservices:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- '8080'
- --scheme
- http
image: cr.weaviate.io/semitechnologies/weaviate:1.30.0
ports:
- 8080:8080
- 50051:50051
volumes:
- weaviate_data:/var/lib/weaviate
restart: on-failure:0
environment:
QUERY_DEFAULTS_LIMIT: 1000
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
DEFAULT_VECTORIZER_MODULE: 'text2vec-google'
ENABLE_MODULES: 'text2vec-google'
CLUSTER_HOSTNAME: 'node1'
# Google PaLM/Vertex AI configuration
PALM_APIKEY: 'AIzaSyDP5WGBgFNEYiF-------------'
volumes:
weaviate_data:
following is code snippet where i am trying to connect to local and creating vector configclient = weaviate.connect_to_local(
host="127.0.0.1",
port=8080,
grpc_port=50051,
headers={
"X-Goog-Studio-Api-Key": "AIzaSyDP5WGBgFNEYiFââââ-"
}
)
vector_config=[
Configure.Vectors.text2vec_google(
name="content_vector",
source_properties=["content"],
# Optional: specify the model
# model="text-embedding-004", # or "textembedding-gecko@001" for Vertex AI
model="gemini-embedding-001", # or "textembedding-gecko@001" for Vertex AI
# Optional: specify project ID if using Vertex AI
project_id="my-project-name"
)
],
i get error as
{âmessageâ: âFailed to send all objects in a batch of 61â, âerrorâ: âWeaviateInsertManyAllFailedError(âEvery object failed during insertion. Here is the set of all errors: connection to Google failed with status: 401 error: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.â)â}
i tried playaround with code, by commenting project_id and other, but after commenting project_id, i get as it as required parameter, what is the solution on this