ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

TODO: Log rate limit errors

Open memves opened this issue 2 years ago • 11 comments

 root@jinnvpn:/home/GPTPython# python3 -m revChatGPT.V2 -e *********** -p ************

        ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
        Repo: github.com/acheong08/ChatGPT
        
Logging in...
Logged in

Type '!help' to show a full list of commands
Press enter twice to submit your question.


You:
Hi

ChatGPT:


Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/GPTPython/tutorial-env/lib/python3.10/site-packages/revChatGPT/V2.py", line 325, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/GPTPython/tutorial-env/lib/python3.10/site-packages/revChatGPT/V2.py", line 315, in main
    result = line["choices"][0]["text"].replace("<|im_end|>", "")
TypeError: string indices must be integers

Have no idea. Is it a bug or what? Please help

memves avatar Feb 12 '23 19:02 memves

same

player2I0 avatar Feb 12 '23 21:02 player2I0

Sometimes my script gets stuck and returns this error. However, I just rerun the script and find that the same code does not return this error.

yiwangethan avatar Feb 13 '23 00:02 yiwangethan

Print full line to show error

acheong08 avatar Feb 13 '23 00:02 acheong08

Could be rate limits

acheong08 avatar Feb 13 '23 00:02 acheong08

The probability of this error occurring is about 1/30. ChatGPT returns 30 responses and encounters this error once.

yiwangethan avatar Feb 13 '23 00:02 yiwangethan

Makes perfect sense

acheong08 avatar Feb 13 '23 00:02 acheong08

Rate limit is 30 requests per minute

acheong08 avatar Feb 13 '23 00:02 acheong08

I always have this error.

fengshansi avatar Feb 13 '23 01:02 fengshansi

Are you sharing your account with anyone? Rate limits are account based

acheong08 avatar Feb 13 '23 01:02 acheong08

Yes. I share it with my classmate.

fengshansi avatar Feb 13 '23 01:02 fengshansi

Your classmate might be overusing.

acheong08 avatar Feb 13 '23 01:02 acheong08