I am trying to troubleshoot the following error.
johnsiano@Johns-MacBook-Air Desktop % python3 openai-test.py
Traceback (most recent call last):
File “/Users/johnsiano/Desktop/openai-test.py”, line 2, in
client = OpenAI()
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/openai/_client.py”, line 101, in init
raise OpenAIError(
openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable