The extension is designed to provide prompt chaining for SillyTavern. The general idea behind it is to force an LLM to generate a character's thoughts (emotions, plans - whatever you wish) before running the regular prompt generation. This increases the overall waiting time for a response in favor of the quality of that response.
- An arbitrary number of user-defined prompts to generate a character’s thoughts before regular generation.
- Configuring how many of the last character’s thoughts are included in a prompt.
- Regenerating specific generated thoughts when necessary.
- Removing extra symbols from thoughts using a customizable regular expression.
- Hiding thoughts behind a spoiler to create intrigue, if desired.
- Assigning custom prompt sets to specific characters.
- Excluding specific characters from the thinking process.
- Isolating thoughts from different characters in group chats by default.
- Allowing certain characters to read the thoughts of other characters in group chats.
- "On-Click" mode for generating thoughts.
- Presets for thinking prompts.
- Using a different API for generating thoughts.
- Localization in Russian.
You can find a more detailed roadmap in the wiki by following this link. Before proposing a feature, please make sure that the feature is not already listed in the roadmap.
Just open the Extensions
menu in SillyTavern, then click on the Install Extension
button.
After that, you may paste the url of this repository to install the extension: https://github.com/cierru/st-stepped-thinking
Upgrading Notice: The guidelines below describe the new "Embedded" (or "Embedded Thoughts") mode, which can be selected in the settings section and is set as the default for new installations. If you have updated Stepped Thinking from version 2 or earlier, your mode will remain "Separated," the old mode that is still included in the extension for backward compatibility. Please note that after upgrading, you will need to assign names to your thinking prompts manually. The "Separated" mode is considered deprecated and will not receive updates in the future. The modes are mutually incompatible; therefore, the golden rule is: one mode = one chat.
- Install the extension.
- Open a chat (solo or group) and send your message.
- You will see:
- An element containing a spoiler with the header "CharacterName's thoughts".
- A popup notifying you that the character is thinking.
- Wait until a popup with the text "Done!" raises.
- The generation of a new message for the same character will be launched automatically.
There is an example of how the result may look like:
You can find the extension settings in the Stepped Thinking
section of the SillyTavern Extensions
menu.
You can access personal character settings via the bubble icon to the left of the star. The icon is white by default, but when the setting is active, it turns green.
These settings will override the general ones when active. For example, you can disable Stepped Thinking activation for
a particular character or use specific thinking prompts for them. If the Prompts for thinking
section is empty in the
character's settings, the general prompts will be used.
Click Activate
to apply the specified settings, or Deactivate
to disable them and use the general ones instead. You
can find the full list of active character settings in the regular Stepped Thinking settings menu under the Character Settings
block.
This command is designed to manually trigger the thought generation process. It accepts two optional arguments:
-
prompt_ids
– the comma-separated IDs of thinking prompts that will be used for generation. -
The name of the character for whom the process will be launched, which is particularly useful for group chats.
Examples:
/stepthink-trigger
— triggers thought generation for your companion in solo chats./stepthink-trigger Seraphina
— triggers thought generation for Seraphina./stepthink-trigger prompt_ids=0,1 Seraphina
- trigger thought generation using prompts with IDs0
and1
for Seraphina.
/stepthink-delete-hidden
This command is intended to purge your chat of hidden thoughts. It also accepts one optional argument - the name
of the character whose thoughts will be removed.
Be cautious: This action cannot be undone!
Examples:
/stepthink-delete-hidden
— removes all hidden thoughts in the current chat./stepthink-delete-hidden Seraphina
— removes all hidden thoughts belonging to Seraphina in the current chat.
Visit the wiki for various useful pages, such as:
- Community-suggested thinking prompts.
- Instructions for creating a button to trigger thoughts generation on demand.
If you want to share your thinking prompts, injection templates, usage experience with different models, or any other experiences, you are most welcome to do so in one of the following ways:
- Write a comment with your suggestions in the dedicated issue.
- Send a message to the Discord channel devoted to Stepped Thinking.
The extension has been tested on SillyTavern 1.12.11+ and may not work with older versions.
You are always welcome to contribute to this project. You may create issues, pull requests, and describe them in English or Russian - whatever is more convenient for you. If you want to implement something that is outside the scope of the roadmap, please create an issue and have the feature approved by the owner.
Special credits to the anon from the /llama thread who described the idea and wrote a PoC of the approach that formed the basis of this extension. You can familiarize yourself with the results of his efforts here: https://rentry.co/LLMCrutches
MIT License
Copyright (c) 2024 cierru