Find answers from the community

Updated last year

How do I get rid of this

How do I get rid of this?
Could not load OpenAI model. Using default LlamaCPP=llama2-13b-chat. If you intended to use OpenAI, please check your OPENAI_API_KEY.

I already have my OpenAI API key and use it like this:

Plain Text
os.environ['OPENAI_API_KEY'] = api_key
openai.api_key = api_key
T
V
2 comments
Looks like your OpenAI API Key is not being detected? Have you made sure it's being loaded

Plain Text
import openai
openai.api_key = "sk--"
Thanks for the response. I was able to make it work. Put this statement openai.api_key = api_key at the very first line of my code.
Add a reply
Sign up and join the conversation on Discord