Giter Site home page Giter Site logo

Rate limit exceeded about chatfred HOT 10 CLOSED

chrislemke avatar chrislemke commented on July 28, 2024 1
Rate limit exceeded

from chatfred.

Comments (10)

dna75 avatar dna75 commented on July 28, 2024 1

I installed 1.2.1
I get an error;
[10:10:29.033] ERROR: ChatFred[Run Script] Traceback (most recent call last):
File "/Users/mymac/stack/Alfred.alfredpreferences/workflows/user.workflow.ECF95AA9-E47F-4F55-854B-09B54347B2ED/src/text_chat.py", line 186, in
__prompt, __response = ke_chat_request(
^^^^^^^^^^^^^^^^^^
File "/Users/mymac/stack/Alfred.alfredpreferences/workflows/user.workflow.ECF95AA9-E47F-4F55-854B-09B54347B2ED/src/text_chat.py", line 147, in make_chat_request
intercept_custom_prompts(prompt)
File "/Users/mymac/stack/Alfred.alfredpreferences/workflows/user.workflow.ECF95AA9-E47F-4F55-854B-09B54347B2ED/src/text_chat.py", line 98, in intercept_custom_prompts
last_request_successful = read_from_cache("last_chat_request_successful")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mymac/stack/Alfred.alfredpreferences/workflows/user.workflow.ECF95AA9-E47F-4F55-854B-09B54347B2ED/src/global_services.py", line 38, in read_from_cache
data = plistlib.load(plist)
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/plistlib.py", line 869, in load
raise InvalidFileException()
plistlib.InvalidFileException: Invalid file

from chatfred.

dna75 avatar dna75 commented on July 28, 2024 1

I added my Billing information + payment method and now it's working!

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024 1

Great! Thanks for your update. Enjoy using ChatFred!

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Hey @kengetz!

Could you give some more details? E.g. the exact error message. Thanks in advance.

from chatfred.

kengetz avatar kengetz commented on July 28, 2024

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Here are some useful links concerning the rate limit:
https://help.openai.com/en/articles/6897202-ratelimiterror
https://help.openai.com/en/articles/6891753-rate-limit-advice

It could be, that the max tokens are set too high. The default for ChatGPT is 4096. You can try adjusting them in the workflow's configuration (Maximum tokens).

You could also try the solution I talked about in this post. With this, you will get a more detailed error message.

from chatfred.

dna75 avatar dna75 commented on July 28, 2024

Same issue here! My token is set but get the same 'rate limit' warning. I checked my openai credits and have used barely anything.

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Hey!
I just created a new release (1.2.1). It contains some new features for troubleshooting maybe this can help you guys solve your issue.

from chatfred.

kengetz avatar kengetz commented on July 28, 2024

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Could you check if you have the ~/Library/Application Support/Alfred/Workflow Data/ai.lemke.chatfred/ChatFred_Cache file?

It somehow looks you still have the old code:

09B54347B2ED/src/global_services.py", line 38, in read_from_cache
data = plistlib.load(plist)

Maybe you can check if /Users/mymac/stack/Alfred.alfredpreferences/workflows/user.workflow.ECF95AA9-E47F-4F55-854B-09B54347B2ED/src/global_services.py" contains this function?

def read_from_cache(entry: str) -> Union[str, int, float, bool, None]:
    """Reads the cache file and returns the value of the entry."""

    if os.path.exists(__cache_file_path):
        with open(__cache_file_path, "rb") as plist:
            data = plistlib.load(plist)
        return data.get(entry)
    else:
        return False

from chatfred.

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.