eli64s / readme-ai

README file generator, powered by large language model APIs 👾
MIT License
1.49k stars 160 forks source link

openAi too many requests error #111

Open VadneyK opened 3 months ago

VadneyK commented 3 months ago

ⓧ ERROR | 2024-07-02 21:17:25 | readmeai.core.models | Error making request for - overview: 429, message='Too Many Requests', url=URL('https://api.openai.com/v1/chat/completions')

this sort of error message repeats over and over.

API calls need a sleep() in between to not get rate limited by OpenAI?

gp-1108 commented 1 month ago

Just hopping in to say that I have the exam same issue. I tried to change the -rl flag down to 1 but it did not fix the issue.

It might be related to open ai api rate limits. Specifically I am on Free Tier. Nevertheless, I should have access to 3 requests per minute to gpt-4o-mini.

I can see from the logs of the file that actually the readmeai tool is capable of doing those 3 requests, it just won't stop try to make more once he is done with the first 3.

The -rl flag does not seems to have an impact on the actual behaviour of the library. If I'll get some spare time I'll have a look into it