Leask / halbot

Just another `ChatGPT` / `Gemini` / `Mistral (by ollama)` Telegram bob, which is simple design, easy to use, extendable and fun.
https://leaskh.com/post/711636926789271552/halbot
MIT License
102 stars 17 forks source link

"Unhandled Exception" when starting a new conversation #9

Closed kamil-malinski closed 1 year ago

kamil-malinski commented 1 year ago

with the latest version I got an "unhandled exception" when I tried to start a new conversation:

[HAL] Prompt: /new
[HAL] Error: InternalError: Unhandled Exception
    at WebSocket.<anonymous> (file:///root/halbot/node_modules/@waylaidwanderer/chatgpt-api/src/BingAIClient.js:437:36)
    at WebSocket.emit (node:events:524:35)
    at Receiver.receiverOnMessage (/root/halbot/node_modules/ws/lib/websocket.js:1184:20)
    at Receiver.emit (node:events:512:28)
    at Receiver.dataMessage (/root/halbot/node_modules/ws/lib/receiver.js:541:14)
    at Receiver.getData (/root/halbot/node_modules/ws/lib/receiver.js:459:17)
    at Receiver.startLoop (/root/halbot/node_modules/ws/lib/receiver.js:158:22)
    at Receiver._write (/root/halbot/node_modules/ws/lib/receiver.js:84:10)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
[UTILITAS] Error: InternalError: Unhandled Exception
    at newError (file:///root/halbot/node_modules/utilitas/lib/utilitas.mjs:18:49)
    at throwError (file:///root/halbot/node_modules/utilitas/lib/utilitas.mjs:19:50)
    at Object.send (file:///root/halbot/node_modules/utilitas/lib/hal.mjs:64:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///root/halbot/skills/ai.mjs:43:30
    at async Promise.all (index 0)
    at async action (file:///root/halbot/skills/ai.mjs:61:5)
    at async execute (/root/halbot/node_modules/telegraf/lib/composer.js:485:17)
    at async /root/halbot/node_modules/telegraf/lib/composer.js:486:21
    at async execute (/root/halbot/node_modules/telegraf/lib/composer.js:485:17) {
  status: 500
Leask commented 1 year ago

Unable to reproduce this. Maybe deep related to #10? Please let me know if you can reproduce this issue and share more info. Thank!

kamil-malinski commented 1 year ago

I'm not able to reproduce it either.

I will let you know if I get it again!

Leask commented 1 year ago

So I think it's related to #10 because the program cannot initiate the new session. After #10 was fixed, it was not able to reproduce anymore. I will close this issue for now, but you are more than welcome to reopen it if something happens again.