AlizerUncaged / desktop-waifu

Desktop Waifu!
335 stars 49 forks source link

Method to end the node_characterai needed? #245

Open syntune opened 9 months ago

syntune commented 9 months ago

I'm referring to only _characterai package by the way, not the entire desktop wife program.

So, I wrote a script based on Alizer's example. Everything worked well, I sent one message, and the waifu responded - but the process continues. It doesn't not end after the response.

Screenshot (169)

After studying the code, I noticed that the package used Puppeteer (ok alizer did address that right in the readme.md), so I assume that the process couldn't end because of the headless Chromium process. There was no way to function in node_characterai that correspond to browser.close()

The only way I know so far is to use ctrl + c, and process.exit(0) just kills the process prematurely. Sometimes ctrl + c leads to my entire computer lagging so hard I had to restart - which was pretty annoying. The better way is if there was a function inside the package to close the browser, something like characterAI.endChat(). Moreover, only Alizer can make changes to the script.

@AlizerUncaged therefore could you add a function to end the chatting session? Or was there a way to end the chat that I had missed?

asdgggg commented 7 months ago

How did you make it work? I get an error that it can't fetch character data after I say somethign and transcribes