From 5b926d4ad3266c17bc2bd36f9c43d7b8e251586a Mon Sep 17 00:00:00 2001 From: Cohee Date: Thu, 1 Jun 2023 22:22:47 +0300 Subject: [PATCH 01/10] Create update-docs.yml --- .github/workflows/update-docs.yml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/update-docs.yml diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml new file mode 100644 index 000000000..ceec6591d --- /dev/null +++ b/.github/workflows/update-docs.yml @@ -0,0 +1,39 @@ +name: Update SillyTavern-Docs + +on: + push: + branches: + - main + +jobs: + update_docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout current repository + uses: actions/checkout@v2 + + - name: Checkout SillyTavern-Docs repository + uses: actions/checkout@v2 + with: + repository: SillyTavern/SillyTavern-Docs + path: SillyTavern-Docs + + - name: Clone SillyTavern wiki into SillyTavern-Docs/wiki + run: git clone https://github.com/SillyTavern/SillyTavern.wiki.git SillyTavern-Docs/wiki + + - name: Copy files + run: | + cp public/notes/content.md SillyTavern-Docs/guidebook.md + cp faq.md SillyTavern-Docs/faq.md + cp README.md SillyTavern-Docs/README.md + cp public/notes/update.md SillyTavern-Docs/update.md + + - name: Commit and push changes to SillyTavern-Docs + run: | + cd SillyTavern-Docs + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "GitHub Actions" + git add guidebook.md faq.md README.md + git commit -m "Update guidebook, faq and README files" + git push From 861e9a31e555bad718cdbbaa75e26d00b0a5f5fb Mon Sep 17 00:00:00 2001 From: Cohee Date: Thu, 1 Jun 2023 22:24:52 +0300 Subject: [PATCH 02/10] Update update-docs.yml --- .github/workflows/update-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index ceec6591d..2f04ac3ac 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -26,7 +26,7 @@ jobs: run: | cp public/notes/content.md SillyTavern-Docs/guidebook.md cp faq.md SillyTavern-Docs/faq.md - cp README.md SillyTavern-Docs/README.md + cp readme.md SillyTavern-Docs/readme.md cp public/notes/update.md SillyTavern-Docs/update.md - name: Commit and push changes to SillyTavern-Docs From 2b69c1793c3f090fe3d7f3a37c938e4a5bb521f7 Mon Sep 17 00:00:00 2001 From: Cohee Date: Thu, 1 Jun 2023 22:43:22 +0300 Subject: [PATCH 03/10] Update update-docs.yml --- .github/workflows/update-docs.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 2f04ac3ac..13665d6e7 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -29,11 +29,15 @@ jobs: cp readme.md SillyTavern-Docs/readme.md cp public/notes/update.md SillyTavern-Docs/update.md - - name: Commit and push changes to SillyTavern-Docs - run: | - cd SillyTavern-Docs - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "GitHub Actions" - git add guidebook.md faq.md README.md - git commit -m "Update guidebook, faq and README files" - git push + - name: Deploy to external repository + uses: cpina/github-action-push-to-another-repository@main + env: + SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY } + with: + # GitHub Action output files + source-directory: SillyTavern-Docs/ + destination-github-username: SillyTavern + destination-repository-name: SillyTavern-Docs + user-email: github-actions[bot]@users.noreply.github.com + user-name: "GitHub Actions" + target-branch: "main" From a1b8c135e4cd699239abb74de7991ca28b82c1af Mon Sep 17 00:00:00 2001 From: Cohee Date: Thu, 1 Jun 2023 22:44:19 +0300 Subject: [PATCH 04/10] Update update-docs.yml --- .github/workflows/update-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 13665d6e7..f6ab94c67 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -32,7 +32,7 @@ jobs: - name: Deploy to external repository uses: cpina/github-action-push-to-another-repository@main env: - SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY } + SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} with: # GitHub Action output files source-directory: SillyTavern-Docs/ From 8cd6467aa9a7522a2d6d2eec96f87a38d7cdf262 Mon Sep 17 00:00:00 2001 From: Cohee Date: Thu, 1 Jun 2023 22:47:40 +0300 Subject: [PATCH 05/10] Update update-docs.yml --- .github/workflows/update-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index f6ab94c67..8a11ea29a 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -20,7 +20,7 @@ jobs: path: SillyTavern-Docs - name: Clone SillyTavern wiki into SillyTavern-Docs/wiki - run: git clone https://github.com/SillyTavern/SillyTavern.wiki.git SillyTavern-Docs/wiki + run: git clone https://github.com/SillyTavern/SillyTavern.wiki.git SillyTavern-Docs/wiki && rm -rf SillyTavern-Docs/wiki/.git - name: Copy files run: | From efc76dfd05772836401cc81c9700a4f2e4c04fa1 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Thu, 1 Jun 2023 23:29:16 +0300 Subject: [PATCH 06/10] Fix world info case sensitive not saving --- public/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/script.js b/public/script.js index fb4e35ca9..0ffc2e23e 100644 --- a/public/script.js +++ b/public/script.js @@ -26,6 +26,7 @@ import { setWorldInfoSettings, deleteWorldInfo, world_info_recursive, + world_info_case_sensitive, } from "./scripts/world-info.js"; import { From 4282cb51dd17acbbc72b31cd8dd7c04d30af2cb8 Mon Sep 17 00:00:00 2001 From: Cohee Date: Fri, 2 Jun 2023 13:22:46 +0300 Subject: [PATCH 07/10] Update faq.md --- faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faq.md b/faq.md index f28d667b0..9fc345b95 100644 --- a/faq.md +++ b/faq.md @@ -91,7 +91,7 @@ These base instructions are only for OpenAI, which is a paid service. You can fi ### Install Tavern -1. Install the latest NodeJS from https://nodejs.org/en/download/current +1. Install the NodeJS LTS from https://nodejs.org/en/download 1. If you know how to use git, clone https://github.com/Cohee1207/SillyTavern. Otherwise, browse to https://github.com/Cohee1207/SillyTavern/releases , download the zip file containing the source code, then extract it locally. 1. Run Start.bat on Windows, or start.sh on OSX/Linux 1. Your browser should have opened to the Tavern UI. This webpage is running locally on your computer. From cf9248121f109e26ed87d2980bce5dac624b2618 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Fri, 2 Jun 2023 19:44:16 +0300 Subject: [PATCH 08/10] Split readme files --- .github/readme.md | 297 ++++++++++++++++++++++++++++ .github/workflows/update-docs.yml | 4 +- readme.md | 311 ++++-------------------------- 3 files changed, 340 insertions(+), 272 deletions(-) create mode 100644 .github/readme.md diff --git a/.github/readme.md b/.github/readme.md new file mode 100644 index 000000000..bd371ab7c --- /dev/null +++ b/.github/readme.md @@ -0,0 +1,297 @@ +![image](https://github.com/Cohee1207/SillyTavern/assets/18619528/8c41a061-7f72-4d2b-9d54-e6d058209e7b) + +Mobile-friendly, Multi-API (KoboldAI/CPP, Horde, NovelAI, Ooba, OpenAI+proxies, Poe, WindowAI(Claude!)), VN-like Waifu Mode, Horde SD, System TTS, WorldInfo (lorebooks), customizable UI, auto-translate, and more prompt options than you'd ever want or need. Optional Extras server for more SD/TTS options + ChromaDB/Summarize. + +Based on a fork of TavernAI 1.2.8 + +### Brought to you by Cohee, RossAscends and the SillyTavern community + +NOTE: We have added [a FAQ](faq.md) to answer most of your questions and help you get started. + +### What is SillyTavern or TavernAI? + +Tavern is a user interface you can install on your computer (and Android phones) that allows you to interact with text generation AIs and chat/roleplay with characters you or the community create. + +SillyTavern is a fork of TavernAI 1.2.8 which is under more active development and has added many major features. At this point, they can be thought of as completely independent programs. + +### What do I need other than Tavern? + +On its own Tavern is useless, as it's just a user interface. You have to have access to an AI system backend that can act as the roleplay character. There are various supported backends: OpenAPI API (GPT), KoboldAI (either running locally or on Google Colab), and more. You can read more about this in [the FAQ](faq.md). + +### Do I need a powerful PC to run Tavern? + +Since Tavern is only a user interface, it has tiny hardware requirements, it will run on anything. It's the AI system backend that needs to be powerful. + +## Mobile support + +> **Note** + +> **This fork can be run natively on Android phones using Termux. Please refer to this guide by ArroganceComplex#2659:** + + + +**.webp character cards import/export is not supported in Termux. Use either JSON or PNG formats instead.** + +## Questions or suggestions? + +### We now have a community Discord server + +Get support, share favorite characters and prompts: + +### [Join](https://discord.gg/RZdyAEUPvj) + +*** + +Get in touch with the developers directly: + +* Discord: Cohee#1207 or RossAscends#1779 +* Reddit: /u/RossAscends or /u/sillylossy +* [Post a GitHub issue](https://github.com/Cohee1207/SillyTavern/issues) + +## This version includes + +* A heavily modified TavernAI 1.2.8 (more than 50% of code rewritten or optimized) +* Swipes +* Group chats: multi-bot rooms for characters to talk to you or each other +* Chat bookmarks / branching (duplicates the dialogue in its current state) +* Advanced KoboldAI / TextGen generation settings with a lot of community-made presets +* World Info support: create a rich lore or save tokens on your character card +* Window AI browser extension support (run models like Claude, GPT 4): https://windowai.io/ +* [Oobabooga's TextGen WebUI](https://github.com/oobabooga/text-generation-webui) API connection +* [AI Horde](https://horde.koboldai.net/) connection +* [Poe.com](https://poe.com) (ChatGPT / Claude) connection +* Soft prompts selector for KoboldAI +* Prompt generation formatting tweaking +* webp character card interoperability (PNG is still an internal format) + +## Extensions + +SillyTavern has an extensibility support, with some additional AI modules hosted via [SillyTavern Extras API](https://github.com/SillyTavern/SillyTavern-extras) + +* Author's Note / Character Bias +* Character emotional expressions +* Auto-Summary of the chat history +* Sending images to chat, and the AI interpreting the content. +* Stable Diffusion image generation (5 chat-related presets plus 'free mode') +* Text-to-speech for AI response messages (via ElevenLabs, Silero, or the OS's System TTS) + +Full list of included extenisons and tutorials how to use them can be found on [Wiki](https://github.com/SillyTavern/SillyTavern/wiki). + +## UI/CSS/Quality of Life tweaks by RossAscends + +* Mobile UI with optimized for iOS, and supports saving a shortcut to home screen and opening in fullscreen mode. +* HotKeys + * Up = Edit last message in chat + * Ctrl+Up = Edit last USER message in chat + * Left = swipe left + * Right = swipe right (NOTE: swipe hotkeys are disabled when chatbar has something typed into it) + * Ctrl+Left = view locally stored variables (in the browser console window) + * Enter (with chat bar selected) = send your message to AI + * Ctrl+Enter = Regenerate the last AI response + +* User Name Changes and Character Deletion no longer force the page to refresh. + +* Toggle option to automatically connect to API on page load. +* Toggle option to automatically load the most recently viewed character on page load. +* Better Token Counter - works on unsaved characters, and shows both permanent and temporary tokens. + +* Better Past Chats View + * New Chat filenames are saved in a readable format of "(character) - (when it was created)" + * Chat preview increased from 40 characters to 300. + * Multiple options for characters list sorting (by name, creation date, chat sizes). + +* By default the left and right settings panel will close when you click away from it. +* Clicking the Lock on the nav panel will hold the panel open, and this setting be remembered across sessions. +* Nav panel status of open or closed will also be saved across sessions. + +* Customizable chat UI: + * Play a sound when a new message arrives + * Switch between round or rectangle avatar styles + * Have a wider chat window on the desktop + * Optional semi-transparent glass-like panels + * Customizable page colors for 'main text', 'quoted text' 'italics text'. + * Customizable UI background color and blur amount + +## Installation + +*NOTE: This software is intended for local install purposes, and has not been thoroughly tested on a colab or other cloud notebook service.* + +> **Warning** + +> DO NOT INSTALL INTO ANY WINDOWS CONTROLLED FOLDER (Program Files, System32, etc). + +> DO NOT RUN START.BAT WITH ADMIN PERMISSIONS + +### Windows + +Installing via Git (recommended for easy updating) + +Easy to follow guide with pretty pictures: + + + 1. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) + 2. Install [GitHub Desktop](https://central.github.com/deployments/desktop/desktop/latest/win32) + 3. Open Windows Explorer (`Win+E`) + 4. Browse to or Create a folder that is not controlled or monitored by Windows. (ex: C:\MySpecialFolder\) + 5. Open a Command Prompt inside that folder by clicking in the 'Address Bar' at the top, typing `cmd`, and pressing Enter. + 6. Once the black box (Command Prompt) pops up, type ONE of the following into it and press Enter: + +* for Main Branch: `git clone https://github.com/Cohee1207/SillyTavern -b main` +* for Dev Branch: `git clone https://github.com/Cohee1207/SillyTavern -b dev` + + 7. Once everything is cloned, double click `Start.bat` to make NodeJS install its requirements. + 8. The server will then start, and SillyTavern will popup in your browser. + +Installing via zip download + + 1. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) + 2. Download the zip from this GitHub repo. (Get the `Source code (zip)` from [Releases](https://github.com/Cohee1207/SillyTavern/releases/latest)) + 3. Unzip it into a folder of your choice + 4. Run `Start.bat` via double-clicking or in a command line. + 5. Once the server has prepared everything for you, it will open a tab in your browser. + +### Linux + + 1. Run the `start.sh` script. + 2. Enjoy. + +## API keys management + +SillyTavern saves your API keys to a `secrets.json` file in the server directory. + +By default they will not be exposed to a frontend after you enter them and reload the page. + +In order to enable viewing your keys by clicking a button in the API block: + +1. Set the value of `allowKeysExposure` to `true` in `config.conf` file. +2. Restart the SillyTavern server. + +## Remote connections + +Most often this is for people who want to use SillyTavern on their mobile phones while their PC runs the ST server on the same wifi network. + +However, it can be used to allow remote connections from anywhere as well. + +**IMPORTANT: SillyTavern is a single-user program, so anyone who logs in will be able to see all characters and chats, and be able to change any settings inside the UI.** + +### 1. Managing whitelisted IPs + +* Create a new text file inside your SillyTavern base install folder called `whitelist.txt`. +* Open the file in a text editor, add a list of IPs you want to be allowed to connect. + +*Both indidivual IPs, and wildcard IP ranges are accepted. Examples:* + +```txt +192.168.0.1 +192.168.0.20 +``` + +or + +```txt +192.168.0.* +``` + +(the above wildcard IP range will allow any device on the local network to connect) + +CIDR masks are also accepted (eg. 10.0.0.0/24). + +* Save the `whitelist.txt` file. +* Restart your TAI server. + +Now devices which have the IP specified in the file will be able to connect. + +*Note: `config.conf` also has a `whitelist` array, which you can use in the same way, but this array will be ignored if `whitelist.txt` exists.* + +### 2. Getting the IP for the ST host machine + +After the whitelist has been setup, you'll need the IP of the ST-hosting device. + +If the ST-hosting device is on the same wifi network, you will use the ST-host's internal wifi IP: + +* For Windows: windows button > type `cmd.exe` in the search bar > type `ipconfig` in the console, hit Enter > look for `IPv4` listing. + +If you (or someone else) wants to connect to your hosted ST while not being on the same network, you will need the public IP of your ST-hosting device. + +* While using the ST-hosting device, access [this page](https://whatismyipaddress.com/) and look for for `IPv4`. This is what you would use to connect from the remote device. + +### 3. Connect the remote device to the ST host machine. + +Whatever IP you ended up with for your situation, you will put that IP address and port number into the remote device's web browser. + +A typical address for an ST host on the same wifi network would look like: + +`http://192.168.0.5:8000` + +Use http:// NOT https:// + +### Opening your ST to all IPs + +We do not recommend doing this, but you can open `config.conf` and change `whitelist` to `false`. + +You must remove (or rename) `whitelist.txt` in the SillyTavern base install folder, if it exists. + +This is usually an insecure practice, so we require you to set a username and password when you do this. + +The username and password are set in `config.conf`. + +After restarting your ST server, any device will be able to connect to it, regardless of their IP as long as they know the username and password. + +### Still Unable To Connect? + +* Create an inbound/outbound firewall rule for the port found in `config.conf`. Do NOT mistake this for portforwarding on your router, otherwise someone could find your chat logs and that's a big no-no. +* Enable the Private Network profile type in Settings > Network and Internet > Ethernet. This is VERY important for Windows 11, otherwise you would be unable to connect even with the aforementioned firewall rules. + +## Performance issues? + +Try enabling the No Blur Effect (Fast UI) mode on the User settings panel. + +## I like your project! How do I contribute? + +### DO's + +1. Send pull requests +2. Send feature suggestions and issue reports using established templates +3. Read the readme file and built-in documentation before asking anything + +### DONT's + +1. Offer monetary donations +2. Send bug reports without providing any context +3. Ask the questions that were already answered numerous times + +## Where can I find the old backgrounds? + +We're moving to 100% original content only policy, so old background images have been removed from this repository. + +You can find them archived here: + + + +## Screenshots + +image +image + +## License and credits + +**This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details.** + +* TAI Base by Humi: Unknown license +* Cohee's modifications and derived code: AGPL v3 +* RossAscends' additions: AGPL v3 +* Portions of CncAnon's TavernAITurbo mod: Unknown license +* Waifu mode inspired by the work of PepperTaco () +* Thanks Pygmalion University for being awesome testers and suggesting cool features! +* Thanks oobabooga for compiling presets for TextGen +* poe-api client adapted from (GPL v3) +* GraphQL files for poe: (ISC License) +* KoboldAI Presets from KAI Lite: +* Noto Sans font by Google (OFL license) +* Icon theme by Font Awesome (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) +* AI Horde client library by ZeldaFan0225: https://github.com/ZeldaFan0225/ai_horde +* Linux startup script by AlpinDale +* Thanks paniphons for providing a FAQ document diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 8a11ea29a..5feed0d0c 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -19,8 +19,8 @@ jobs: repository: SillyTavern/SillyTavern-Docs path: SillyTavern-Docs - - name: Clone SillyTavern wiki into SillyTavern-Docs/wiki - run: git clone https://github.com/SillyTavern/SillyTavern.wiki.git SillyTavern-Docs/wiki && rm -rf SillyTavern-Docs/wiki/.git + - name: Clone SillyTavern wiki into SillyTavern-Docs/extensions + run: git clone https://github.com/SillyTavern/SillyTavern.wiki.git SillyTavern-Docs/extensions && rm -rf SillyTavern-Docs/extensions/.git - name: Copy files run: | diff --git a/readme.md b/readme.md index bd371ab7c..6337e486b 100644 --- a/readme.md +++ b/readme.md @@ -1,72 +1,35 @@ -![image](https://github.com/Cohee1207/SillyTavern/assets/18619528/8c41a061-7f72-4d2b-9d54-e6d058209e7b) +# What is SillyTavern? -Mobile-friendly, Multi-API (KoboldAI/CPP, Horde, NovelAI, Ooba, OpenAI+proxies, Poe, WindowAI(Claude!)), VN-like Waifu Mode, Horde SD, System TTS, WorldInfo (lorebooks), customizable UI, auto-translate, and more prompt options than you'd ever want or need. Optional Extras server for more SD/TTS options + ChromaDB/Summarize. +![](https://github.com/Cohee1207/SillyTavern/assets/18619528/8c41a061-7f72-4d2b-9d54-e6d058209e7b) -Based on a fork of TavernAI 1.2.8 +Brought to you by Cohee, RossAscends, and the SillyTavern community, SillyTavern is a local-install interface that allows you to interact with text generation AIs (LLMs) to chat and roleplay with custom characters. -### Brought to you by Cohee, RossAscends and the SillyTavern community +SillyTavern originated as a modification of TavernAI 1.2.8 in February 2023, and has since added many cutting edge features not present in the original TavernAI. -NOTE: We have added [a FAQ](faq.md) to answer most of your questions and help you get started. +### Features -### What is SillyTavern or TavernAI? - -Tavern is a user interface you can install on your computer (and Android phones) that allows you to interact with text generation AIs and chat/roleplay with characters you or the community create. - -SillyTavern is a fork of TavernAI 1.2.8 which is under more active development and has added many major features. At this point, they can be thought of as completely independent programs. - -### What do I need other than Tavern? - -On its own Tavern is useless, as it's just a user interface. You have to have access to an AI system backend that can act as the roleplay character. There are various supported backends: OpenAPI API (GPT), KoboldAI (either running locally or on Google Colab), and more. You can read more about this in [the FAQ](faq.md). - -### Do I need a powerful PC to run Tavern? - -Since Tavern is only a user interface, it has tiny hardware requirements, it will run on anything. It's the AI system backend that needs to be powerful. - -## Mobile support - -> **Note** - -> **This fork can be run natively on Android phones using Termux. Please refer to this guide by ArroganceComplex#2659:** - - - -**.webp character cards import/export is not supported in Termux. Use either JSON or PNG formats instead.** - -## Questions or suggestions? - -### We now have a community Discord server - -Get support, share favorite characters and prompts: - -### [Join](https://discord.gg/RZdyAEUPvj) - -*** - -Get in touch with the developers directly: - -* Discord: Cohee#1207 or RossAscends#1779 -* Reddit: /u/RossAscends or /u/sillylossy -* [Post a GitHub issue](https://github.com/Cohee1207/SillyTavern/issues) - -## This version includes - -* A heavily modified TavernAI 1.2.8 (more than 50% of code rewritten or optimized) +* Mobile-friendly interface +* Multiple backend API connectivity ([KoboldAI](https://github.com/KoboldAI/KoboldAI-Client), [KoboldCPP](https://github.com/LostRuins/koboldcpp), [AI Horde](https://horde.koboldai.net/), [NovelAI](https://github.com/LostRuins/koboldcpp), [Oobabooga's TextGen WebUI](https://github.com/oobabooga/text-generation-webui), [OpenAI](https://chat.openai.com/)+proxies, [Poe.com](https://poe.com), [WindowAI](https://windowai.io)) +* Visual Novel-like Waifu Mode +* Horde Stable Diffusion generation +* TTS support (ElevenLabs, Silero, and built-in OS) +* WorldInfo (lorebooks) +* Customizable colors, backgrounds, avatar styles, and UI panel placement +* Notification sound for AI responses +* Export chats as .txt files +* Auto-translate single messages or the entire chat via Google API, even automatically. +* Extensive prompt formatting options +* Character HotSwap buttons to quickly change between your favorite characters +* Prompt token breakdown view for each message * Swipes * Group chats: multi-bot rooms for characters to talk to you or each other -* Chat bookmarks / branching (duplicates the dialogue in its current state) -* Advanced KoboldAI / TextGen generation settings with a lot of community-made presets -* World Info support: create a rich lore or save tokens on your character card -* Window AI browser extension support (run models like Claude, GPT 4): https://windowai.io/ -* [Oobabooga's TextGen WebUI](https://github.com/oobabooga/text-generation-webui) API connection -* [AI Horde](https://horde.koboldai.net/) connection -* [Poe.com](https://poe.com) (ChatGPT / Claude) connection -* Soft prompts selector for KoboldAI -* Prompt generation formatting tweaking -* webp character card interoperability (PNG is still an internal format) +* Chat bookmarks / branching +* Soft prompts via KoboldAI +* webp character card interoperability (PNG is still the internal format) -## Extensions +### Extensions -SillyTavern has an extensibility support, with some additional AI modules hosted via [SillyTavern Extras API](https://github.com/SillyTavern/SillyTavern-extras) +SillyTavern supports extensions/plugins: * Author's Note / Character Bias * Character emotional expressions @@ -75,223 +38,31 @@ SillyTavern has an extensibility support, with some additional AI modules hosted * Stable Diffusion image generation (5 chat-related presets plus 'free mode') * Text-to-speech for AI response messages (via ElevenLabs, Silero, or the OS's System TTS) -Full list of included extenisons and tutorials how to use them can be found on [Wiki](https://github.com/SillyTavern/SillyTavern/wiki). +Additional functionality can be added by using [SillyTavern Extras](https://github.com/SillyTavern/SillyTavern-extras). -## UI/CSS/Quality of Life tweaks by RossAscends +### Screenshots -* Mobile UI with optimized for iOS, and supports saving a shortcut to home screen and opening in fullscreen mode. -* HotKeys - * Up = Edit last message in chat - * Ctrl+Up = Edit last USER message in chat - * Left = swipe left - * Right = swipe right (NOTE: swipe hotkeys are disabled when chatbar has something typed into it) - * Ctrl+Left = view locally stored variables (in the browser console window) - * Enter (with chat bar selected) = send your message to AI - * Ctrl+Enter = Regenerate the last AI response +![](https://user-images.githubusercontent.com/18619528/228649245-8061c60f-63dc-488e-9325-f151b7a3ec2d.png) +![](https://user-images.githubusercontent.com/18619528/228649856-fbdeef05-d727-4d5a-be80-266cbbc6b811.png) -* User Name Changes and Character Deletion no longer force the page to refresh. +### Installation Requirements -* Toggle option to automatically connect to API on page load. -* Toggle option to automatically load the most recently viewed character on page load. -* Better Token Counter - works on unsaved characters, and shows both permanent and temporary tokens. +SillyTavern will run on virtually any device capable of running NodeJS v18. -* Better Past Chats View - * New Chat filenames are saved in a readable format of "(character) - (when it was created)" - * Chat preview increased from 40 characters to 300. - * Multiple options for characters list sorting (by name, creation date, chat sizes). +### What do I need other than SillyTavern? -* By default the left and right settings panel will close when you click away from it. -* Clicking the Lock on the nav panel will hold the panel open, and this setting be remembered across sessions. -* Nav panel status of open or closed will also be saved across sessions. +SillyTavern is only a frontend interface, so you will need to have access to one of backend APIs listed above. -* Customizable chat UI: - * Play a sound when a new message arrives - * Switch between round or rectangle avatar styles - * Have a wider chat window on the desktop - * Optional semi-transparent glass-like panels - * Customizable page colors for 'main text', 'quoted text' 'italics text'. - * Customizable UI background color and blur amount +### How can I get in touch with the developers directly? -## Installation +* Discord: Cohee#1207 or RossAscends#1779 +* Reddit: /u/RossAscends or /u/sillylossy +* [Post a GitHub issue](https://github.com/Cohee1207/SillyTavern/issues) -*NOTE: This software is intended for local install purposes, and has not been thoroughly tested on a colab or other cloud notebook service.* +### I like your project! How do I contribute? -> **Warning** - -> DO NOT INSTALL INTO ANY WINDOWS CONTROLLED FOLDER (Program Files, System32, etc). - -> DO NOT RUN START.BAT WITH ADMIN PERMISSIONS - -### Windows - -Installing via Git (recommended for easy updating) - -Easy to follow guide with pretty pictures: - - - 1. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) - 2. Install [GitHub Desktop](https://central.github.com/deployments/desktop/desktop/latest/win32) - 3. Open Windows Explorer (`Win+E`) - 4. Browse to or Create a folder that is not controlled or monitored by Windows. (ex: C:\MySpecialFolder\) - 5. Open a Command Prompt inside that folder by clicking in the 'Address Bar' at the top, typing `cmd`, and pressing Enter. - 6. Once the black box (Command Prompt) pops up, type ONE of the following into it and press Enter: - -* for Main Branch: `git clone https://github.com/Cohee1207/SillyTavern -b main` -* for Dev Branch: `git clone https://github.com/Cohee1207/SillyTavern -b dev` - - 7. Once everything is cloned, double click `Start.bat` to make NodeJS install its requirements. - 8. The server will then start, and SillyTavern will popup in your browser. - -Installing via zip download - - 1. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) - 2. Download the zip from this GitHub repo. (Get the `Source code (zip)` from [Releases](https://github.com/Cohee1207/SillyTavern/releases/latest)) - 3. Unzip it into a folder of your choice - 4. Run `Start.bat` via double-clicking or in a command line. - 5. Once the server has prepared everything for you, it will open a tab in your browser. - -### Linux - - 1. Run the `start.sh` script. - 2. Enjoy. - -## API keys management - -SillyTavern saves your API keys to a `secrets.json` file in the server directory. - -By default they will not be exposed to a frontend after you enter them and reload the page. - -In order to enable viewing your keys by clicking a button in the API block: - -1. Set the value of `allowKeysExposure` to `true` in `config.conf` file. -2. Restart the SillyTavern server. - -## Remote connections - -Most often this is for people who want to use SillyTavern on their mobile phones while their PC runs the ST server on the same wifi network. - -However, it can be used to allow remote connections from anywhere as well. - -**IMPORTANT: SillyTavern is a single-user program, so anyone who logs in will be able to see all characters and chats, and be able to change any settings inside the UI.** - -### 1. Managing whitelisted IPs - -* Create a new text file inside your SillyTavern base install folder called `whitelist.txt`. -* Open the file in a text editor, add a list of IPs you want to be allowed to connect. - -*Both indidivual IPs, and wildcard IP ranges are accepted. Examples:* - -```txt -192.168.0.1 -192.168.0.20 -``` - -or - -```txt -192.168.0.* -``` - -(the above wildcard IP range will allow any device on the local network to connect) - -CIDR masks are also accepted (eg. 10.0.0.0/24). - -* Save the `whitelist.txt` file. -* Restart your TAI server. - -Now devices which have the IP specified in the file will be able to connect. - -*Note: `config.conf` also has a `whitelist` array, which you can use in the same way, but this array will be ignored if `whitelist.txt` exists.* - -### 2. Getting the IP for the ST host machine - -After the whitelist has been setup, you'll need the IP of the ST-hosting device. - -If the ST-hosting device is on the same wifi network, you will use the ST-host's internal wifi IP: - -* For Windows: windows button > type `cmd.exe` in the search bar > type `ipconfig` in the console, hit Enter > look for `IPv4` listing. - -If you (or someone else) wants to connect to your hosted ST while not being on the same network, you will need the public IP of your ST-hosting device. - -* While using the ST-hosting device, access [this page](https://whatismyipaddress.com/) and look for for `IPv4`. This is what you would use to connect from the remote device. - -### 3. Connect the remote device to the ST host machine. - -Whatever IP you ended up with for your situation, you will put that IP address and port number into the remote device's web browser. - -A typical address for an ST host on the same wifi network would look like: - -`http://192.168.0.5:8000` - -Use http:// NOT https:// - -### Opening your ST to all IPs - -We do not recommend doing this, but you can open `config.conf` and change `whitelist` to `false`. - -You must remove (or rename) `whitelist.txt` in the SillyTavern base install folder, if it exists. - -This is usually an insecure practice, so we require you to set a username and password when you do this. - -The username and password are set in `config.conf`. - -After restarting your ST server, any device will be able to connect to it, regardless of their IP as long as they know the username and password. - -### Still Unable To Connect? - -* Create an inbound/outbound firewall rule for the port found in `config.conf`. Do NOT mistake this for portforwarding on your router, otherwise someone could find your chat logs and that's a big no-no. -* Enable the Private Network profile type in Settings > Network and Internet > Ethernet. This is VERY important for Windows 11, otherwise you would be unable to connect even with the aforementioned firewall rules. - -## Performance issues? - -Try enabling the No Blur Effect (Fast UI) mode on the User settings panel. - -## I like your project! How do I contribute? - -### DO's - -1. Send pull requests -2. Send feature suggestions and issue reports using established templates -3. Read the readme file and built-in documentation before asking anything - -### DONT's - -1. Offer monetary donations -2. Send bug reports without providing any context -3. Ask the questions that were already answered numerous times - -## Where can I find the old backgrounds? - -We're moving to 100% original content only policy, so old background images have been removed from this repository. - -You can find them archived here: - - - -## Screenshots - -image -image - -## License and credits - -**This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details.** - -* TAI Base by Humi: Unknown license -* Cohee's modifications and derived code: AGPL v3 -* RossAscends' additions: AGPL v3 -* Portions of CncAnon's TavernAITurbo mod: Unknown license -* Waifu mode inspired by the work of PepperTaco () -* Thanks Pygmalion University for being awesome testers and suggesting cool features! -* Thanks oobabooga for compiling presets for TextGen -* poe-api client adapted from (GPL v3) -* GraphQL files for poe: (ISC License) -* KoboldAI Presets from KAI Lite: -* Noto Sans font by Google (OFL license) -* Icon theme by Font Awesome (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -* AI Horde client library by ZeldaFan0225: https://github.com/ZeldaFan0225/ai_horde -* Linux startup script by AlpinDale -* Thanks paniphons for providing a FAQ document +* We welcome pull requests! +* We also welcome helpful and informed bug reports that use the templates provided in our GitHub. +* We do not accept monetary donations for the project itself. +* Cohee does not take donations. +* RossAscends has a personal [Patreon](https://www.patreon.com/RossAscends) & [Kofi](https://ko-fi.com/rossascends) From 737bb5a0305dcaf94f596f471a623ae0cecd16cd Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Fri, 2 Jun 2023 20:00:58 +0300 Subject: [PATCH 09/10] Add placeholders to group folders for [BUG] docker-compose build image will not start #434 --- public/group chats/README.md | 1 + public/groups/README.md | 1 + server.js | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 public/group chats/README.md create mode 100644 public/groups/README.md diff --git a/public/group chats/README.md b/public/group chats/README.md new file mode 100644 index 000000000..535c6dab6 --- /dev/null +++ b/public/group chats/README.md @@ -0,0 +1 @@ +# Put Group Chat JSONL files here diff --git a/public/groups/README.md b/public/groups/README.md new file mode 100644 index 000000000..0f56f2da9 --- /dev/null +++ b/public/groups/README.md @@ -0,0 +1 @@ +# Put Group JSON files here diff --git a/server.js b/server.js index 028759ce3..2b9b3b062 100644 --- a/server.js +++ b/server.js @@ -1938,8 +1938,8 @@ app.post('/getgroups', jsonParser, (_, response) => { fs.mkdirSync(directories.groups); } - const files = fs.readdirSync(directories.groups); - const chats = fs.readdirSync(directories.groupChats); + const files = fs.readdirSync(directories.groups).filter(x => path.extname(x) === '.json'); + const chats = fs.readdirSync(directories.groupChats).filter(x => path.extname(x) === '.jsonl'); files.forEach(function (file) { try { From b3e1dd8a429abf3f6cfead3645978989fae32585 Mon Sep 17 00:00:00 2001 From: Cohee Date: Fri, 2 Jun 2023 20:06:50 +0300 Subject: [PATCH 10/10] Update update-docs.yml --- .github/workflows/update-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 5feed0d0c..567cac607 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -20,7 +20,7 @@ jobs: path: SillyTavern-Docs - name: Clone SillyTavern wiki into SillyTavern-Docs/extensions - run: git clone https://github.com/SillyTavern/SillyTavern.wiki.git SillyTavern-Docs/extensions && rm -rf SillyTavern-Docs/extensions/.git + run: rm -rf SillyTavern-Docs/extensions && git clone https://github.com/SillyTavern/SillyTavern.wiki.git SillyTavern-Docs/extensions && rm -rf SillyTavern-Docs/extensions/.git - name: Copy files run: |