Skip to content
New issue

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

Automatically transmit API keys found in the environment variables along with the request #89

Open
dandv opened this issue Oct 6, 2022 · 0 comments

Comments

@dandv
Copy link
Contributor

dandv commented Oct 6, 2022

When importing data for a class with the vectorizer set to 'text2vec-openai', I got the error

OpenAI API Key: no api key found neither in request header: X-OpenAI-Api-Key nor in environment variable under OPENAI_APIKEY

However, OPENAI_APIKEY was in fact set. The error was thus misleading.

Would it be within the scope of the client to automatically pick up the OpenAI API key from the OPENAI_APIKEY environment variable and add it into the request header, i.e. by setting headers: { 'X-OpenAI-Api-Key': process.env.OPENAI_APIKEY }?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant