-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add /slash command system to chat mode, with memory related and /worldinfo commands #58
base: dev
Are you sure you want to change the base?
Conversation
* Adds a /help slash command to chat mode usable by both user and bot
* Refactor worldInfo retrieval into its own function * Add a /memorize command for chat mode * Add a /recall command for chat mode * Add a /worldinfo command for chat mode * Fixes to when and how / commands are parsed for both input and generation.
Like the idea of this - Just a thought from my side though from some quick tests:
If you think these might be interesting I can probably give them a tinker, I'm pretty intrigued by the ideas to generate world info / potentially even run things like "Summarise the context before into memory" similar to the auto generate memory but with a single line command / clean up. All these ideas of mine are more in future with how extensible this system could be, not right now - Just opens up quite a few nice quick options for commands from the keyboard with I'm all in favour 👍 ! |
Yes, I thought of having the turn stay with whichever of You or the AI entered the command. I think that does make sense. But changing the turn order -- along with getting it to work for Instruct and maybe Adventure -- looked non-obvious enough at an initial glance that I decided to KISS and concentrate on basics.
My reasoning on having the memories separate from the world info, was that I didn't think people would want the AI putting random stuff in it willy nilly, and the genesis of the idea was for the AI to be able to do things through the commands. We would probably need to make that an User only command. The one world info thing I did wonder about was whether there needs to be a way to allow you to have world info, so you can get at it with the /worldinfo command, but not have it be inserted in the usual way. But I'm not really familiar with how people use world info. The couple of extra commands that seemed obvious to me to do at some point would be one to trigger an image generation (so the AI could do it as well as you), and another to grab something from a URL. The summarisation one also makes sense, you would probably need summarisation for the URL one anyway. I think those are future though. Another thought I had was seeing whether its possible to load up a separate .js file with additional commands, as a kind of command plugin/make your own command system. Not sure whether that is direction we want to go though. For the current PR, I'm considering whether I should split the enable/disable into separate 'enable for AI' and 'enable for User' options, and whether the other TODOs I have for the local setting stuff should actually be saved with the Memory in the save file rather than as general settings. |
* Add a setting + UI for enabling and disabling /commands for the AI. * Add a setting + UI for enabling and disabling /commands for the User. * Default these new settings to false/disabled. * Add a setting specifying the name that /command results are returned from. Default is 'System' (No UI) * Rename /command functions from snake_case to camelCase.
* Define the responses for memory /commands in `current_char_memory_templates` instead of hardcoding them in the code. * Save `current_char_memory_templates` settings alongside the character memories in the save file. * Fix /memorize and /recall behaviour, when no arguments given. * Remove some inappropriate newlines from /command responses.
* Rename /memorize to /note and update function and variable names to match.
…oboldai.net into add_slash_commands
Motivation
I got to thinking that the model should be able to add and recall things outside its context window for the character it is playing by just saying saying some sort of 'magic words' which lite would parse. After some fiddling about I realised that since this is chat mode, the 'magic words' would probably make most sense as /slash commands.
I thought about reusing world info as the memory store, but that seemed dubious. Instead this implements the memory as a very simplistic dictionary of saved responses, and has a separate /slash command to lookup (but not change) world info
Changes
(fdd7da4)
(b321298)
To Do
UI?No UI) (44ba115)localsettings for/ command response templates (probably no UI atm) (7343a56)Possible Problems/Concerns