[Bug]: Some notebooks set OPENAI_API_TOKEN instead of OPENAI_API_KEY
joelrorseth opened this issue · comments
Joel Rorseth commented
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