SillyTavern MultiPlayer is an LLM chat interface that allows multiple users to chat together with an AI.
- Created by RossAscends.
If this software brings you and your friend's joy, donations to Ross can be made via:
Ko-fi |
Patreon |
For tech support or to contact RossAscends directly, join the SillyTavern Discord.
- Make sure Node JS is installed on your system and has access through your firewall.
- Clone this github repo. (
git clone https://github.com/RossAscends/STMP/
in a command line, or use a Github GUI like Github Desktop) - Setup the API (see below).
- Run
STMP.bat
to install the required Node modules and start the server. - On the first run, the server will create an empty
secrets.json
and a defaultconfig.json
, as well as the/api-presets/
and/chats/
folders. - Open
htttp://localhost:8181/
in your web browser.
(instructions coming soon)
Currently STMP supports Text Completions (TC) and HordeAI, with TC active by default.
External Text Completion and Chat Completion connections are currently a Work in Progress! We have tested with connecting to OpenAI's GPT 3.5 Turbo, and found it works. Therefore all Chat Completions APIs are currently hard coded to request a response from
gpt-3.5-turbo
. We intend to soon add model selection for APIs that offer it.
Anthropic APIs will very likely not work yet!
- In the Host Control Panel open the selector under the 'API' text and select
Add New API
. - Some inputs will be displayed.
Name
- the label you want to remember the API asFull Endpoint URL
- this is the FULL AND ENTIRE endpoint URL, not just the base server URL.Key
- If your API requires a key, put it in here.Endpoint Type
- select from Text Completions or Chat Completions as appropriate for the API endpoint.
- When all of these are filled out, press Save.
- Using Horde requires a SillyTavern server to be running on your local machine to handle the Horde requests.
IMPORTANT: ST must be running with CSRF turned off.
- the easiest way to do this is to make a new
.bat
or.sh
file with the following contents:
cd c:\_path_\_to_your_\SillyTavern
call npm install --no-audit
node server.js --disableCsrf
pause
popd
IMPORTANT: STMP assumes you have BasicAuthentication enabled on your ST server.
Input your ST Authentication
username:pass
intosecrets.json
on the appropriate line between the quotation marks.
- STMP assumes the default ST server URL of
http://127.0.0.1:8000/api/horde/generate-text
for Horde requests. - If you have a HordeID set in SillyTavern, those credentials and kudos will be used.
This must be done AFTER completing all installation steps above.
- Make sure your STMP server is running.
- Run
Remote-Link.cmd
to downloadcloudflared.exe
(only one time, 57MB). - the Cloudflared server will auto-start and generate a random tunnel URL for your STMP server.
- Copy the URL displayed in the middle of the large box in the center of the console window.
DO NOT CLOSE THE CLOUDFLARE CONSOLE WINDOW
- Share the generated cloudflared URL with the guest users.
- User will be able to directly and securely connect to your PC by opening the URL in their browser.
- User can change their display name at any time using either of the inputs at the top of the respective chat displays.
- You can have a different name for the User Chat and AI Chat.
- Usernames are stored in browser localStorage.
- Chatting can be done in either chat windows by typing into the appropriate box and then either pressing the Send button (βοΈ), or pressing Enter.
Shift+Enter
can be used to add newlines to the input.- Markdown formatting is respected.
The host will see the following controls:
API
type- π = Text Completions
- π§ = Horde
Context
defines how long your API prompt should be. Longer = more chat history sent, but slower processing times.Response
defines how many tokens long the AI response can be.Sampler
sets the hyperparameter preset, which affects the response style.Instruct
sets the type of instruct sequences to use when crafting the API prompt.AutoAI
Toggle to determine whether the AI should respond to every user input, or only on command from the Host.Final Instruction
textbox sets what to send as a system message at Depth 1 in the prompt.
- A list of past AI Chats, click to load one.
- (π) refreshes the Past AI Chats list (usually not necessary as it is auto-refreshed with each new AI chat message)
- (π€β³) sets the number of seconds delay between inputs to the AI Chat.
- (π§β³) does the same, but for the User-to-User chat.
- During the delay period the (βοΈ) for that chat will become (π«), and no input will be possible.
- The golden (
βοΈ ) toggles visibility of the Host Control Panel. - (πΌοΈ) toggles the chat windows between three modes: maximize AI chat >> maximize User Chat >> return to normal dual display.
- this is very helpful for mobile users!
- (π) toggles display of both User lists.
- (
βΆοΈ /βΈοΈ) allows for manual disconnect/reconnect to the server. - (π) opens a text box for input of the Host key in order to gain the Host role.
- Once a vlid key has been entered, the page will automatically refresh to show the host controls.
- The Host key can be found in the server console at startup.
- After the user enters the key and presses Enter, their page will refresh and they will see the Host controls.
- (β) clears the saved Usernames and UniqueID from localStorage.
- A selector to set the active AI character
- (ποΈ) to clear either chat.
- (π€) Manually triggering an AI response without user Input
- (βοΈ) Deleting the last message in the AI Chat
- (π) Retry, i.e. Remove the last chat message and prompt the AI character to give a new response.
- Place any SillyTavern compatible character card into the
/characters/
folder and refresh the page. - Character can be selected at the top of the AI Chat panel.
- If new characters are added while the server is running, the Host must refresh their browser page to see them.
- the AI character can be changed at any time without resetting the chat.
- If you want to add more presets for Instruct formats or hyperparameter Samplers, put the JSON file into the appropriate folder:
- Samplers go in
/public/api-presets/
- Instruct formats go in
/public/instructFormats/
- It's highly reccomended to review the structure of the default STMP preset files.
- SillyTavern preset files may not work, or may have unintended effects!
- Smarter retry logic (add entity metadata to each chat message; only remove the last AI response)
- Custom OpenAI text completion compatible API endpoint selection
- Toggle for locking AI chat for users? (this is already kind of done with AutoResponse off)
- Drag-sort list to set User Turn Order for AI chatting?
- Allow API key/Authentication information to be set via the UI.
- Ability to rename chats.
- ability to remove any message in the chat, not just the last.
- ability to edit the text of a chat
- ability for Host to edit a User's role from the UI
- ability to change the max length of chat inputs (currently 1000 characters)
- Multiple AI characters active at once (group chats)
- Download chats as text, JSON, or SillyTavern-compatible JSONL?
- UI themes?
- Bridge extension for SillyTavern to enable intra-server communication.