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

[Bug]: Some notebooks set OPENAI_API_TOKEN instead of OPENAI_API_KEY #13401

Closed
joelrorseth opened this issue May 9, 2024 · 0 comments · Fixed by #13402
Closed

[Bug]: Some notebooks set OPENAI_API_TOKEN instead of OPENAI_API_KEY #13401

joelrorseth opened this issue May 9, 2024 · 0 comments · Fixed by #13402
Assignees
Labels
bug Something isn't working triage Issue needs to be triaged/prioritized

Comments

@joelrorseth
Copy link
Collaborator

Bug Description

Some notebooks in the docs set the OPENAI_API_TOKEN environment variable instead of the correct OPENAI_API_KEY variable. The latter is the correct environment variable llama_index looks for when calling OpenAI's API. The former is not correct, and users will encounter errors when the proper variable is not set.

Version

0.10.36

Steps to Reproduce

Follow the instructions in an affected notebook (e.g., https://docs.llamaindex.ai/en/stable/examples/multi_modal/openai_multi_modal/). In other words, use the following incorrect configuration before running any llama_index code that uses the OpenAI API:

import os

OPENAI_API_TOKEN = "sk-"  # Your OpenAI API token here
os.environ["OPENAI_API_TOKEN"] = OPENAI_API_TOKEN

Relevant Logs/Tracbacks

No response

@joelrorseth joelrorseth added bug Something isn't working triage Issue needs to be triaged/prioritized labels May 9, 2024
@joelrorseth joelrorseth self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs to be triaged/prioritized
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant