hwchase17 / chat-your-data

MIT License
901 stars 266 forks source link

how to get a OPENAI_API_KEY? #18

Closed dportabella closed 1 year ago

dportabella commented 1 year ago

I run:

$ python3 ingest_data.py
  Did not find openai_api_key, please add an environment variable `OPENAI_API_KEY` which contains it, or pass  `openai_api_key` as a named parameter. (type=value_error)

I tried the following to get a OPENAI_API_KEY: Sign up on https://app.aleph-alpha.com/ and Create Token on https://app.aleph-alpha.com/profile I get a token 125 chars long.

I run:

$ export OPENAI_API_KEY=eyJ0eXAiOiJKV...
$ python3 ingest_data.py
openai.error.AuthenticationError: <empty message>

What is the correct way to get OPENAI_API_KEY?

dportabella commented 1 year ago

Ok, it is needed an API key from OpenAI. Here it is how to get an account and key: https://platform.openai.com/signup https://platform.openai.com/account/api-keys