https://pypi.org/project/openai/
"The library needs to be configured with your account's secret key which is available on the website. [...] Set it as the OPENAI_API_KEY environment variable"
When I ask Chat GPT to complete a message
import openai
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "What are the trade-offs around deadwood in forests?"}]
)
print(response)
I get a RateLimitError: You exceeded your current quota, please check your plan and billing details.
Is there a python method to check that the key is valid?
In [35]: openai.api_key
Out[35]: 'sk-...'