readme-ai icon indicating copy to clipboard operation
readme-ai copied to clipboard

ERROR HTTPStatus Exception: Client error '429 Too Many Requests' for url 'https://api.openai.com/v1/chat/completions'

Open ataur39n-sharif opened this issue 1 year ago • 17 comments

I am using this with Docker. Here I providing some error messages--

my command is -

docker run -it \ -e OPENAI_API_KEY=API_KEY \ -v "$(pwd)":/app zeroxeli/readme-ai:latest \ readmeai -o readme-ai.md -r https://github.com/ataur39n-sharif/book-catelog-backend

Error -

ERROR HTTPStatus Exception: Client error '429 Too Many Requests' for url 'https://api.openai.com/v1/chat/completions' For more information check: https://httpstatuses.com/429

images -

doc-command doc-0 doc-1 doc-2

doc-command

ataur39n-sharif avatar Oct 09 '23 05:10 ataur39n-sharif

Hi @ataur39n-sharif I just pulled the latest image and ran you're repo. Can you try once more with the latest and let me know if you still experience this?

Thanks!

eli64s avatar Oct 23 '23 20:10 eli64s

Same Here! I tried with the latest image. image

image

Cro22 avatar Oct 23 '23 23:10 Cro22

@Cro22 @ataur39n-sharif Are you using a free OpenAI account or payment method?

eli64s avatar Oct 23 '23 23:10 eli64s

@eli64s I use the paid OpenAI Account

Cro22 avatar Oct 24 '23 23:10 Cro22

@eli64s I am using a free account of OpenAI

ataur39n-sharif avatar Oct 25 '23 03:10 ataur39n-sharif

I'm also getting the same 429 error on my readme using [https://readmeai.streamlit.app/]

jatolentino avatar Oct 28 '23 17:10 jatolentino

why not add rate limiting ?

Aviksaikat avatar Nov 05 '23 01:11 Aviksaikat

@Aviksaikat There is a default rate limit setting in the config file

This seems like a common issue for unpaid accounts, but still happens for paid accounts occasionally. I may need to work on a more robust API implementation to solve this problem for everyone.

eli64s avatar Nov 05 '23 15:11 eli64s

@eli64s should we increase or decrease the rate_limit variable?

jatolentino avatar Nov 05 '23 16:11 jatolentino

it should be decreased.

Aviksaikat avatar Nov 06 '23 22:11 Aviksaikat

how can we update the config file ?

Aviksaikat avatar Nov 07 '23 02:11 Aviksaikat

that rate_limit field it totally useless.

Aviksaikat avatar Nov 08 '23 21:11 Aviksaikat

Got the same error and using a paid api-key. Is there any workaround?

daan-ef2 avatar Nov 16 '23 10:11 daan-ef2

I encountered the same issue and resolved it by switching the model to gpt-4-1106-preview. After forking the repository and reviewing the code, it appears that the issue stems from a limitation with the default gpt-4 model. The README also indicates that it uses gpt-4-1106-preview. I've implemented these changes in my local files and added a troubleshooting section to the README.

As a temporary fix, you can use the following command:

readmeai --output readme-ai.md --model gpt-4-1106-preview --repository https://github.com/eli64s/readme-ai.

However, this is my first time contributing to a project, and I'm not entirely sure about the proper procedures for contributing.

abhi245y avatar Nov 27 '23 16:11 abhi245y

@abhi245y that is correct, using the model engine gpt-4-1106-preview would be a temporary workaround. However, take note of the following before trying this.

[!WARNING]

During brief testing of the gpt-4-1106-preview model I've noticed higher API costs. If trying this workaround, use the OpenAI API Dashboard to continuously track your API usage and cost.

Thank you, Eli

eli64s avatar Nov 27 '23 17:11 eli64s

Yah you are right, when I gave the script a few runs during testing, my usage shot up from 0.21$ to 1.4$ real quick. But if you're just using it once, it's no big deal.

I also noticed that you switched the model to gpt-4-1106-preview and then reverted it back to gpt-4. At first, I didn't understand why, but now it makes sense.

abhi245y avatar Nov 27 '23 18:11 abhi245y

Had issues with —model gpt-4-1106-preview and —model gpt-3.5-turbo, but it works well with —model gpt-4.

alexiuscrow avatar Jan 09 '24 10:01 alexiuscrow