I installed weaviate through docker and enable text2vec-huggingface. I use additional_headers to input huggingface API key. But when adding documents with huggingface model, I get this error "message’: ‘update vector: failed with status: 400 error: Authorization header is correct, but the token seems invalid’. But when swtiching to Weaivate cloud service, it is working with the same API key. Do you have a clue?
This works:
client = weaviate.Client(
url= WCS_url, # Replace w/ your endpoint
auth_client_secret=weaviate.AuthApiKey(api_key=WCS_API_key), # Replace w/ your Weaviate instance API key. Delete if authentication is disabled.
#url = local_instance_url,
additional_headers={
“X-HuggingFace-Api-Key”: hf_api_key
},
)
This does not work:
client = weaviate.Client(
#url= WCS_url, # Replace w/ your endpoint
#auth_client_secret=weaviate.AuthApiKey(api_key=WCS_API_key), # Replace w/ your Weaviate instance API key. Delete if authentication is disabled.
url = local_instance_url,
additional_headers={
“X-HuggingFace-Api-Key”: hf_api_key
},
)