Giter Site home page Giter Site logo

Rate limit reached about developer HOT 8 CLOSED

smol-ai avatar smol-ai commented on July 3, 2024
Rate limit reached

from developer.

Comments (8)

MohHeader avatar MohHeader commented on July 3, 2024 1

I got the same issue, fixed it by minor code adjustment

+import time

-           for filename, filecode in generate_file.map(
-                list_actual, order_outputs=False, kwargs=dict(filepaths_string=filepaths_string, shared_dependencies=shared_dependencies, prompt=prompt)
-            ):
-                write_file(filename, filecode, directory)

+            for actual in list_actual:
+              filename, filecode = generate_file(actual, filepaths_string=filepaths_string, shared_dependencies=shared_dependencies, prompt=prompt)
+              write_file(filename, filecode, directory)
+              time.sleep(30)  # wait for 30 seconds

so it just wait 30 seconds between API calls

from developer.

swyxio avatar swyxio commented on July 3, 2024 1

thanks guys, i will try to solve this rate limit issue at the library level

from developer.

ether8unny avatar ether8unny commented on July 3, 2024

I am getting a similar error

from developer.

ZachHandley avatar ZachHandley commented on July 3, 2024

I reached this error as well, but using GPT4 with 4000 tokens/min rate limit reached

from developer.

meadow-kun avatar meadow-kun commented on July 3, 2024

Got the issue as well. Would be good with some config parameter as a measure against this.

from developer.

teknightstick avatar teknightstick commented on July 3, 2024

+import time

  •       for filename, filecode in generate_file.map(
    
  •            list_actual, order_outputs=False, kwargs=dict(filepaths_string=filepaths_string, shared_dependencies=shared_dependencies, prompt=prompt)
    
  •        ):
    
  •            write_file(filename, filecode, directory)
    
  •        for actual in list_actual:
    
  •          filename, filecode = generate_file(actual, filepaths_string=filepaths_string, shared_dependencies=shared_dependencies, prompt=prompt)
    
  •          write_file(filename, filecode, directory)
    
  •          time.sleep(30)  # wait for 30 seconds
    

Where exactly did you put this?

from developer.

brucemeek avatar brucemeek commented on July 3, 2024

import time goes at the top with the other imports
line 175 in main.py

from developer.

teknightstick avatar teknightstick commented on July 3, 2024

Awesome I can confirm that adding this delay made the rate limit error disappear. I am using gpt4

from developer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.