AuthenticationError Traceback (most recent call last)
in <cell line: 18>()
16 {text}
17 “”"
—> 18 response = get_completion(prompt)
19 print(response)
5 frames
/usr/local/lib/python3.10/dist-packages/openai/util.py in default_api_key()
184 return openai.api_key
185 else:
→ 186 raise openai.error.AuthenticationError(
187 “No API key provided. You can set your API key in code using ‘openai.api_key = ’, or you can set the environment variable OPENAI_API_KEY=). If your API key is stored in a file, you can point the openai module at it with ‘openai.api_key_path = ’. You can generate API keys in the OpenAI web interface. See OpenAI Platform for details.”
188 )
AuthenticationError: No API key provided. You can set your API key in code using ‘openai.api_key = ’, or you can set the environment variable OPENAI_API_KEY=). If your API key is stored in a file, you can point the openai module at it with ‘openai.api_key_path = ’. You can generate API keys in the OpenAI web interface. See OpenAI Platform for details.