I am doing this short course on my Laptop, I have this Error “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”.
How can I get an API_KEY in OpenAI to use Whisper?
Summary to date I have a MAC and Command lines I type
putenv. (it show me all the environment variables on my MAC and it displays me the OPENAI_API_KEY)
OPENAI_API_KEY=xxxxxyyy…xxxyz
On my JupyterLab execute
import os
import openai
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file
env = os.environ.copy()
print(env) (it doesn’t display the environment variable OPENAI_API_KEY )
so this instruction is Error
openai.api_key = os.environ[“OPENAI_API_KEY”]
Do you have any ideas to help me or any suggestions?
1)Install Python 2) Install the OpenAI Python Library 3)Setup you API key for all projects 4)Making an API request and return this message:
‘You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.’, ‘type’: ‘insufficient_quota’, ‘param’: None, ‘code’: ‘insufficient_quota’}}
I don’t know what I have to do, because:
I have configured my credit card in the OpenAI account.
I have configured the Usage Limits
I don’t have any idea if I have to do something on the Pay as you go section because I was using “Tier free”