My python API script for chat GPT is saying that I have exceeded my quota and I haven't used it before so I'm not sure how to fix it.
I looked at a few forums regarding this and after a bit I gave up
I am using python with a non paid subscription and have not used any API before so I am new to this kind of thing
Code that I am using:
import openai
openai.api_key = 'Api key in here'
messages = [ {"role": "system", "content": "You are an intelligent assistant." } ]
while True:
message = input("You: ")
messages.append(
{"role": "user", "content": message},
)
chat = openai.ChatCompletion.create(
model="gpt-3.5-turbo", messages=messages
)
reply = chat.choices[0].message
print("Assistant: ", reply.content)
messages.append(reply)
The API key is fine because the usage page on the website told me that I had used it
Full error:
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.