Skip to content

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

@dandv

Description

@dandv

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 }?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions