Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: text output to telegram comes from two chats chatgpt #46

Open
2 tasks done
leyalton opened this issue Mar 29, 2023 · 1 comment
Open
2 tasks done

[Bug]: text output to telegram comes from two chats chatgpt #46

leyalton opened this issue Mar 29, 2023 · 1 comment

Comments

@leyalton
Copy link

Not a duplicate issue

  • I have searched the existing issues and confirmed this issue is not a duplicate.

Verify ChatGPT service is operational

Bot version

v2.4.2

API type

browser

Environment details

I use node.js versions 9.6.2. I run the program using npm commands and without using docker.

Describe the Bug

When issuing a telegram response, the bot creates 2 chats in the gp chat and first issues a response from the first chat, then erases it and issues a response from the second chat.

To Reproduce

I run everything according to the instructions:

  • pnpm install
  • pnpm build && pnpm start

then i just make a request in a telegram bot and this situation occurs

Logs

chatgpt-telegram-bot@2.4.2 start C:\project\chatgpt
node --experimental-loader=extensionless dist/index.js

(node:20076) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
30.03.2023, 00:34:29 🔮 ChatGPT API has started...
30.03.2023, 00:34:30 🤖 Bot @my_bot has started...
30.03.2023, 00:35:45 📩 Message from @account (1494399999) in private chat:
hi, write a 2000-character text on the topic of data structures and Java algorithms
chatgpt sendMessage error; retrying... ProtocolError: Runtime.callFunctionOn timed out.
30.03.2023, 00:36:50 ⛔️ ChatGPT API error: ProtocolError: Runtime.callFunctionOn timed out.

Additional context

photo_2023-03-30_00-47-07
photo_2023-03-30_00-47-08
these screenshots show how under 1 request, the first answer option appears first, and then the second

@RainEggplant
Copy link
Owner

I don't know if this is related to the timeout mechanism. If this only happens for long responses, you can try to increase the api.browser.timeoutMs and see if it resolves the problem.

This could also be a problem with the browser-based API, which has not been maintained for a long time. So I suggest you switch to the official API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants