We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Getting header token from google.oauth2 & service account and passing ElasticsearchDocumentStore headers arg returns:
TypeError: elasticsearch.Elasticsearch() got multiple values for keyword argument 'headers'
Code:
def get_token(): credentials = service_account.IDTokenCredentials.from_service_account_file( SERVICE_ACCOUNT_FILE, target_audience=SEARCH) request = google.auth.transport.requests.Request() credentials.refresh(request) token = credentials.token header = { 'Authorization': f'Bearer {token}' } return header
ElasticsearchDocumentStore(hosts = SEARCH, embedding_similarity_function="cosine", index=index_name, headers=header)
I tested with Elasticsearch client same header works.
However, just passing token to bearer_auth works. Which I used in my project.
Describe your environment (please complete the following information):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Getting header token from google.oauth2 & service account and passing ElasticsearchDocumentStore headers arg returns:
TypeError: elasticsearch.Elasticsearch() got multiple values for keyword argument 'headers'
Code:
ElasticsearchDocumentStore(hosts = SEARCH, embedding_similarity_function="cosine", index=index_name, headers=header)
I tested with Elasticsearch client same header works.
However, just passing token to bearer_auth works. Which I used in my project.
Describe your environment (please complete the following information):
The text was updated successfully, but these errors were encountered: