Skip to content

Forum in maintenance, we will back soon 🙂

I don't understand ...
 
Notifications
Clear all

I don't understand the reason of error.

6 Posts
3 Users
3 Reactions
876 Views
(@geonho-park)
Posts: 4
Active Member Customer
Topic starter
 

This is my code on python.

 

------------------------------------------------------------------

import openai
openai.api_key="my_secret_api_key"
defgenerate_text_with_openai(user_prompt):
completion=openai.ChatCompletion.create(
model="gpt-3.5-turbo", # you can replace this with your preferred model
messages=[{"role": "user", "content": user_prompt}],
)
returncompletion.choices[0].message.content

prompt='Give me 5 topics for youtube videos'

response=generate_text_with_openai(prompt)
print(response)
 
------------------------------------------------------------------
 
 
and the Error code is this.
 
 
------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/geonhopark/Desktop/Python/PythonWorkSpace/chatgpt.py", line 13, in <module>
response = generate_text_with_openai(prompt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/geonhopark/Desktop/Python/PythonWorkSpace/chatgpt.py", line 5, in generate_text_with_openai
completion = openai.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 298, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 700, in _interpret_response
self._interpret_response_line(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.
------------------------------------------------------------------
 
 
 
 
I asked Chat GPT about this, and it responsed 
 

The error message specifically states: "You exceeded your current quota, please check your plan and billing details." This suggests that your API usage, based on the provided API key, has reached the limit set for your current plan. To resolve this issue, you can consider the following steps:

 
 
How can I solve this problem?
 
Posted : 08/14/2023 10:51 am
Topic Tags
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

you need an active OpenAI Subscription

 
Posted : 08/14/2023 6:28 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@admin time for an effective FAQ. One that will allow the post to become the Q&A.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 08/14/2023 11:06 pm
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

@ssadvisor I plan to add something like "Common Questions" in the course.

 
Posted : 08/16/2023 7:30 am
SSAdvisor reacted
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@admin but what about the non-course members?

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 08/16/2023 6:08 pm
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

@ssadvisor the course common answers will be available only to members

 
Posted : 08/21/2023 6:28 am
SSAdvisor reacted
Share:
[the_ad_group id="312"]