chatgpt-telegram-bot icon indicating copy to clipboard operation
chatgpt-telegram-bot copied to clipboard

The new version 2.2.0 seems to be not working

Open savokiss opened this issue 1 year ago • 11 comments

The queue may be stucked, and can't be released.

It always reply You are #{n} in line.

savokiss avatar Feb 28 '23 11:02 savokiss

Is this due to network issues (the API is not responding)? Does switching to the previous version resolve the problem?

RainEggplant avatar Feb 28 '23 11:02 RainEggplant

Yep, I revert the branch and it's OK now. Note that I use the unofficial mode. While the ChatGPT website is ok, only the telegram respond seems stucked.

savokiss avatar Feb 28 '23 11:02 savokiss

It's weird... Mine seems to be working fine. Can you provide more details on how to reproduce this problem?

RainEggplant avatar Feb 28 '23 11:02 RainEggplant

Maybe because I've add a fetch polyfill? I am using Node 16 and had to polyfill that. I'll check it later and provide some more detail. Thanks for your attention~ 😄

savokiss avatar Feb 28 '23 11:02 savokiss

does the queue is reset when /reset or /reload are triggered? i got it stuck and after reloading the session it still adding to queue

soyelmismo avatar Feb 28 '23 18:02 soyelmismo

does the queue is reset when /reset or /reload are triggered?

No, /reset and /reload will not reset the queue. The requests in the queue won't be affected. /reset only starts a new conversation for the upcoming messages, and /reload should only be used for the browser API.

i got it stuck and after reloading the session it still adding to queue

What's the version of node you're using? In what circumstances will it get stuck?

RainEggplant avatar Mar 01 '23 05:03 RainEggplant

idk how it happens, maybe it dont perceive a timeout from the api and it just stop receiving the prompt output and the queue gets the bug

Screenshot_20230301-111431_Nagram

soyelmismo avatar Mar 01 '23 22:03 soyelmismo

Sometimes the API does not respond. Will add a timeout mechanism to fix this.

RainEggplant avatar Mar 03 '23 06:03 RainEggplant

Sometimes the API does not respond. Will add a timeout mechanism to fix this.

Yep, May be the network issue. May not be the Node.js version problem.

savokiss avatar Mar 03 '23 14:03 savokiss

For everyone who is facing issues with order being hanged right now

  1. This is mostly happening on unofficial/browser api. Official api doesnt have this issue
  2. The only way to fix that is to reject hanged requests. That could be done by adding timeoutMs param to the _api.sendMessage (I recommend 30s)

However, we are not currently satisfied with timeout mechanism on chatgpt-api side since it doesnt count onProgress trigger as request succeed, instead, it just waits for stream to close.

I'm currently working on PR for chatgpt-api to add this mechanism and after that fix will be added there. With other nasty feature :D

So, please, use timeoutMs for api as temporary solution, there will be fix soon.

Vadko avatar Mar 03 '23 18:03 Vadko

I've added a simple timeout mechanism in #36 as an initial fix. Still waiting for https://github.com/transitive-bullshit/chatgpt-api/pull/444 to be merged.

RainEggplant avatar Mar 10 '23 06:03 RainEggplant