kardolus / chatgpt-cli

ChatGPT CLI is an advanced command-line interface for ChatGPT models via OpenAI and Azure, offering streaming, query mode, and history tracking for seamless, context-aware conversations. Ideal for both users and developers, it provides advanced configuration and easy setup options to ensure a tailored conversational experience with the GPT model.
MIT License
404 stars 28 forks source link

http error: 429 #15

Closed xsoulp closed 8 months ago

xsoulp commented 8 months ago

Everytime i try a query, i get a 429. nothing more is said

kardolus commented 8 months ago

A 429 means you hit a rate limit. I made a note to improve the error message (ie. show more info than just the http code).

You can perhaps get more information by trying a curl:

curl --location --insecure --request POST 'https://api.openai.com/v1/chat/completions' \
  --header "Authorization: Bearer ${OPENAI_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data-raw '{
     "model": "gpt-3.5-turbo",
     "messages": [{"role": "user", "content": "What is the OpenAI mission?"}]
    }'
kardolus commented 8 months ago

Actually, could you share the output of that curl in case you are still having a 429. Would be a great test case :).

kardolus commented 8 months ago

Never mind, fixed this in 1.3.3: https://github.com/kardolus/chatgpt-cli/releases/tag/v1.3.3

xsoulp commented 8 months ago

Thanks for your help. I found out the problem using the curl command you provided

"error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": "insufficient_quota" }

It seems my free plan doesn't allow me to use the api? I never use it

On Thu, Oct 19, 2023, 01:59 Guillermo Kardolus @.***> wrote:

Closed #15 https://github.com/kardolus/chatgpt-cli/issues/15 as completed.

— Reply to this email directly, view it on GitHub https://github.com/kardolus/chatgpt-cli/issues/15#event-10702194397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARSKEU6YRFQ4PB6KU5KJE3YAB3P3AVCNFSM6AAAAAA6DR2PFWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG4YDEMJZGQZTSNY . You are receiving this because you authored the thread.Message ID: @.***>

kardolus commented 8 months ago

Thanks for sharing the error message! I didn't know the free plan didn't allow for API usage. That's a bummer.