talos-bots / TalOS-Reborn

LLM Powered discord bot, Character Card enabled Chat page, Stable Diffusion discord bot, and overall AI tool. All from one app, TalOS: Reborn.
GNU General Public License v3.0
23 stars 7 forks source link

[BUG] /cont after /clear crashes TalOS-Reborn #20

Closed alicat22 closed 7 months ago

alicat22 commented 8 months ago

Describe the bug Using /cont on an empty context will lead to infinite server restarting and the bot essentially crashes.

To Reproduce Steps to reproduce the behavior:

  1. Use a character that has Description and System Prompt and /swapchar to it
  2. /clear chat
  3. /cont
  4. See error

Expected behavior The bot should generate off the context of the system prompt and character card, prepended by the character's name.

Screenshots The following generates over and over again forever:

[1] Uncaught Exception: Error: listen EADDRINUSE: address already in use :::3003
[1]     at Server.setupListenHandle [as _listen2] (node:net:1872:16)
[1]     at listenInCluster (node:net:1920:12)
[1]     at Server.listen (node:net:2008:7)
[1]     at file:///H:/AI/TalOS-Reborn/TalOS-Reborn/dist/server.js:249:16
[1]     at Generator.next (<anonymous>)
[1]     at H:\AI\TalOS-Reborn\TalOS-Reborn\node_modules\tslib\tslib.js:169:75
[1]     at new Promise (<anonymous>)
[1]     at __awaiter (H:\AI\TalOS-Reborn\TalOS-Reborn\node_modules\tslib\tslib.js:165:16)
[1]     at main (file:///H:/AI/TalOS-Reborn/TalOS-Reborn/dist/server.js:161:12)
[1]     at process.<anonymous> (file:///H:/AI/TalOS-Reborn/TalOS-Reborn/dist/server.js:420:5) {
[1]   code: 'EADDRINUSE',
[1]   errno: -4091,
[1]   syscall: 'listen',
[1]   address: '::',
[1]   port: 3003
[1] }

Desktop OS: Windows 11 Browser: Chrome Version: 120.0.6099.217