Added credits about 2 hours ago. Can’t follow the tutorial. The issue is not fixed.
RateLimitError: Error code: 429 - {‘error’: {‘message’: ‘You exceeded your current quota, please check your plan and billing details.’, ‘type’: ‘insufficient_quota’, ‘param’: None, ‘code’: ‘insufficient_quota’}}
impor t os,sys
os.environ['OPENAI_API_KEY'] = mykey
from openai import OpenAI
# client = OpenAI(organization=org)
client = OpenAI(api_key=mykey)
# completion = client.chat.completions.create(
# model="gpt-4",
# messages=[
# {"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."},
# {"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."}
# ]
# )
# print(completion.choices[0].message)
stream = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Say this is a test"}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content is not None:
print(chunk.choices[0].delta.content, end="")