Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.62k stars 694 forks source link

revChatGPT\V3.PY | Exception: Error: 429 Too Many Requests #228

Closed GeboArt closed 1 year ago

GeboArt commented 1 year ago

After having run the application without problems, I have drawbacks or limitations that I don't understand or rather that I still don't know how to solve them.

PS K:\****\****\****\****\Discord\Bot> python main.py
2023-03-07 01:40:10,617 - discord.client - WARNING - __init__ - PyNaCl is not installed, voice will NOT be supported
2023-03-07 01:40:10 INFO     discord.client logging in using static token
2023-03-07 01:40:10,619 - discord.client - INFO - login - logging in using static token
2023-03-07 01:40:11 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: 7e3ffa1d2f21a0d1d41c200fee1e99f4).
2023-03-07 01:40:11,474 - discord.gateway - INFO - received_message - Shard ID None has connected to Gateway (Session ID: 7e3ffa1d2f21a0d1d41c200fee1e99f4).
2023-03-07 01:40:13 INFO     src.bot -> Send starting prompt with size 11
2023-03-07 01:40:13,477 - src.bot - INFO - send_start_prompt - Send starting prompt with size 11
2023-03-07 01:40:13 ERROR    src.bot -> Error while sending starting prompt: Error: 429 Too Many Requests {
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}
Traceback (most recent call last):
  File "K:\****\****\****\****\Discord\Bot\src\bot.py", line 108, in send_start_prompt
    response = f"{response}{await responses.official_handle_response(prompt)}"
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\****\****\****\****\Discord\Bot\src\responses.py", line 20, in official_handle_response
    return offical_chatbot.ask(message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\****\****\AppData\Roaming\Python\Python311\site-packages\revChatGPT\V3.py", line 130, in ask
    for chunk in response:
  File "K:\****\****\AppData\Roaming\Python\Python311\site-packages\revChatGPT\V3.py", line 97, in ask_stream
    raise Exception(
Exception: Error: 429 Too Many Requests {
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}

2023-03-07 01:40:13,838 - src.bot - ERROR - send_start_prompt - Error while sending starting prompt: Error: 429 Too Many Requests {
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}
Traceback (most recent call last):
  File "K:\****\****\****\****\Discord\Bot\src\bot.py", line 108, in send_start_prompt
    response = f"{response}{await responses.official_handle_response(prompt)}"
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\****\****\****\****\Discord\Bot\src\responses.py", line 20, in official_handle_response
    return offical_chatbot.ask(message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\****\****\AppData\Roaming\Python\Python311\site-packages\revChatGPT\V3.py", line 130, in ask
    for chunk in response:
  File "K:\****\****\AppData\Roaming\Python\Python311\site-packages\revChatGPT\V3.py", line 97, in ask_stream
    raise Exception(
Exception: Error: 429 Too Many Requests {
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}

2023-03-07 01:40:14 INFO     src.bot -> ChatGPT3.5#8219 is now running!
2023-03-07 01:40:14,137 - src.bot - INFO - on_ready - ChatGPT3.5#8219 is now running!
Zero6992 commented 1 year ago

You have to add your credit card info into openAI api page to fix this

GeboArt commented 1 year ago

Thanks you. The problem came because I created another account with a number that was already verified and that's why I couldn't use the free version anymore.