Merge branch 'release' into staging

This commit is contained in:
Cohee
2024-04-06 15:29:22 +03:00
5 changed files with 153 additions and 90 deletions

View File

@ -69,16 +69,16 @@ body:
required: false required: false
- type: checkboxes - type: checkboxes
id: idiot-check id: user-check
attributes: attributes:
label: Please tick the boxes label: Please tick the boxes
description: Before submitting, please ensure that description: Before submitting, please ensure that you have completed the following checklist
options: options:
- label: You have explained the issue clearly, and included all relevant info - label: I have explained the issue clearly, and I included all relevant info
required: true required: true
- label: You've checked that this [issue hasn't already been raised](https://github.com/SillyTavern/SillyTavern/issues?q=is%3Aissue) - label: I have checked that this [issue hasn't already been raised](https://github.com/SillyTavern/SillyTavern/issues?q=is%3Aissue)
required: true required: true
- label: You've checked the [docs](https://docs.sillytavern.app/) ![important](https://img.shields.io/badge/Important!-F6094E) - label: I have checked the [docs](https://docs.sillytavern.app/) ![important](https://img.shields.io/badge/Important!-F6094E)
required: true required: true
- type: markdown - type: markdown

View File

@ -15,7 +15,7 @@ body:
- 'No' - 'No'
- 'Yes' - 'Yes'
validations: validations:
required: false required: true
# Field 2 - Is it bug-related # Field 2 - Is it bug-related
- type: textarea - type: textarea
@ -67,16 +67,16 @@ body:
validations: validations:
required: true required: true
# Field 7 - Can the user implement # Field 7 - Can the user user test in staging
- type: dropdown - type: dropdown
id: canImplement id: canTestStaging
attributes: attributes:
label: Is this something you would be keen to implement? label: Are you willing to test this on staging/unstable branch if this is implemented?
description: Are you raising this ticket in order to get an issue number for your PR? description: Otherwise you'll need to wait until the next stable release after the feature is developed.
options: options:
- 'No' - 'No'
- 'Maybe' - 'Maybe'
- 'Yes!' - 'Yes'
validations: validations:
required: false required: false

143
.github/readme.md vendored
View File

@ -1,6 +1,8 @@
<a name="readme-top"></a>
English | [中文](readme-zh_cn.md) | [日本語](readme-ja_jp.md) English | [中文](readme-zh_cn.md) | [日本語](readme-ja_jp.md)
![SillyTavern-Banner](https://github.com/SillyTavern/SillyTavern/assets/18619528/c2be4c3f-aada-4f64-87a3-ae35a68b61a4) ![][cover]
Mobile-friendly layout, Multi-API (KoboldAI/CPP, Horde, NovelAI, Ooba, OpenAI, OpenRouter, Claude, Scale), VN-like Waifu Mode, Stable Diffusion, TTS, WorldInfo (lorebooks), customizable UI, auto-translate, and more prompt options than you'd ever want or need + ability to install third-party extensions. Mobile-friendly layout, Multi-API (KoboldAI/CPP, Horde, NovelAI, Ooba, OpenAI, OpenRouter, Claude, Scale), VN-like Waifu Mode, Stable Diffusion, TTS, WorldInfo (lorebooks), customizable UI, auto-translate, and more prompt options than you'd ever want or need + ability to install third-party extensions.
@ -22,6 +24,11 @@ SillyTavern is a user interface you can install on your computer (and Android ph
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. 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.
## Screenshots
<img width="400" alt="image" src="https://github.com/SillyTavern/SillyTavern/assets/61471128/e902c7a2-45a6-4415-97aa-c59c597669c1">
<img width="400" alt="image" src="https://github.com/SillyTavern/SillyTavern/assets/61471128/f8a79c47-4fe9-4564-9e4a-bf247ed1c961">
### Branches ### Branches
SillyTavern is being developed using a two-branch system to ensure a smooth experience for all users. SillyTavern is being developed using a two-branch system to ensure a smooth experience for all users.
@ -31,36 +38,25 @@ SillyTavern is being developed using a two-branch system to ensure a smooth expe
If you're not familiar with using the git CLI or don't understand what a branch is, don't worry! The release branch is always the preferable option for you. If you're not familiar with using the git CLI or don't understand what a branch is, don't worry! The release branch is always the preferable option for you.
### What do I need other than Tavern? ### What do I need other than SillyTavern?
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](https://docs.sillytavern.app/usage/faq/). On its own SillyTavern 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](https://docs.sillytavern.app/usage/faq/).
### Do I need a powerful PC to run Tavern? ### Do I need a powerful PC to run SillyTavern?
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. Since SillyTavern 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:**
<https://rentry.org/STAI-Termux>
## Questions or suggestions? ## Questions or suggestions?
### We now have a community Discord server ### We now have a community Discord server
Get support, share favorite characters and prompts: | [![][discord-shield-badge]][discord-link] | [Join our Discord community!](https://discord.gg/sillytavern) Get support, share favorite characters and prompts. |
| :---------------------------------------- | :----------------------------------------------------------------------------------------------------------------- |
### [Join](https://discord.gg/sillytavern) Or get in touch with the developers directly:
***
Get in touch with the developers directly:
* Discord: cohee or rossascends * Discord: cohee or rossascends
* Reddit: /u/RossAscends or /u/sillylossy * Reddit: [/u/RossAscends](https://www.reddit.com/user/RossAscends/) or [/u/sillylossy](https://www.reddit.com/user/sillylossy/)
* [Post a GitHub issue](https://github.com/SillyTavern/SillyTavern/issues) * [Post a GitHub issue](https://github.com/SillyTavern/SillyTavern/issues)
## This version includes ## This version includes
@ -124,61 +120,88 @@ A full list of included extensions and tutorials on how to use them can be found
* Customizable page colors for 'main text', 'quoted text', and 'italics text'. * Customizable page colors for 'main text', 'quoted text', and 'italics text'.
* Customizable UI background color and blur amount * Customizable UI background color and blur amount
## Installation # ⌛ 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
> * INSTALLATION ON WINDOWS 7 IS IMPOSSIBLE AS IT CAN NOT RUN NODEJS 18.16
> **Warning** ## 🪟 Windows
> 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)
An easy-to-follow guide with pretty pictures:
<https://docs.sillytavern.app/installation/windows/>
## Installing via Git
1. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) 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) 2. Install [Git for Windows](https://gitforwindows.org/)
3. Open Windows Explorer (`Win+E`) 3. Open Windows Explorer (`Win+E`)
4. Browse to or Create a folder that is not controlled or monitored by Windows. (ex: C:\MySpecialFolder\) 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. 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: 6. Once the black box (Command Prompt) pops up, type ONE of the following into it and press Enter:
* for Release Branch: `git clone https://github.com/SillyTavern/SillyTavern -b release` - for Release Branch: `git clone https://github.com/SillyTavern/SillyTavern -b release`
* for Staging Branch: `git clone https://github.com/SillyTavern/SillyTavern -b staging` - for Staging Branch: `git clone https://github.com/SillyTavern/SillyTavern -b staging`
7. Once everything is cloned, double-click `Start.bat` to make NodeJS install its requirements. 7. Once everything is cloned, double-click `Start.bat` to make NodeJS install its requirements.
8. The server will then start, and SillyTavern will pop up in your browser. 8. The server will then start, and SillyTavern will pop up in your browser.
Installing via ZIP download (discouraged) ## Installing via SillyTavern Launcher
1. Install [Git for Windows](https://gitforwindows.org/)
2. Open Windows Explorer (`Win+E`) and make or choose a folder where you wanna install the launcher to
3. Open a Command Prompt inside that folder by clicking in the 'Address Bar' at the top, typing `cmd`, and pressing Enter.
4. When you see a black box, insert the following command: `git clone https://github.com/SillyTavern/SillyTavern-Launcher.git`
5. Double-click on `installer.bat` and choose what you wanna install
6. After installation double-click on `launcher.bat`
## Installing via GitHub Desktop
(This allows git usage **only** in GitHub Desktop, if you want to use `git` on the command line too, you also need to install [Git for Windows](https://gitforwindows.org/))
1. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) 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/SillyTavern/SillyTavern/releases/latest)) 2. Install [GitHub Desktop](https://central.github.com/deployments/desktop/desktop/latest/win32)
3. Unzip it into a folder of your choice 3. After installing GitHub Desktop, click on `Clone a repository from the internet....` (Note: You **do NOT need** to create a GitHub account for this step)
4. Run `Start.bat` by double-clicking or in a command line. 4. On the menu, click the URL tab, enter this URL `https://github.com/SillyTavern/SillyTavern`, and click Clone. You can change the Local path to change where SillyTavern is going to be downloaded.
5. Once the server has prepared everything for you, it will open a tab in your browser. 6. To open SillyTavern, use Windows Explorer to browse into the folder where you cloned the repository. By default, the repository will be cloned here: `C:\Users\[Your Windows Username]\Documents\GitHub\SillyTavern`
7. Double-click on the `start.bat` file. (Note: the `.bat` part of the file name might be hidden by your OS, in that case, it will look like a file called "`Start`". This is what you double-click to run SillyTavern)
8. After double-clicking, a large black command console window should open and SillyTavern will begin to install what it needs to operate.
9. After the installation process, if everything is working, the command console window should look like this and a SillyTavern tab should be open in your browser:
10. Connect to any of the [supported APIs](https://docs.sillytavern.app/usage/api-connections/) and start chatting!
### Linux ## 🐧 Linux & 🍎 MacOS
#### Unofficial Debian/Ubuntu PKGBUILD For MacOS / Linux all of these will be done in a Terminal.
> **This installation method is unofficial and not supported by the project. Report any issues to the PKGBUILD maintainer.** 1. Install git and nodeJS (the method for doing this will vary depending on your OS)
> The method is intended for Debian-based distributions (Ubuntu, Mint, etc). 2. Clone the repo
1. Install [makedeb](https://www.makedeb.org/). - for Release Branch: `git clone https://github.com/SillyTavern/SillyTavern -b release`
2. Ensure you have Node.js v18 or higher installed by running `node -v`. If you need to upgrade, you can install a [node.js repo](https://mpr.makedeb.org/packages/nodejs-repo) (you'll might need to edit the version inside the PKGBUILD). As an alternative, install and configure [nvm](https://mpr.makedeb.org/packages/nvm) to manage multiple node.js installations. Finally, you can [install node.js manually](https://nodejs.org/en/download), but you will need to update the PATH variable of your environment. - for Staging Branch: `git clone https://github.com/SillyTavern/SillyTavern -b staging`
3. Now build the [sillytavern package](https://mpr.makedeb.org/packages/sillytavern). The build needs to run with the correct node.js version.
#### Manual 3. `cd SillyTavern` to navigate into the install folder.
4. Run the `start.sh` script with one of these commands:
- `./start.sh`
- `bash start.sh`
## Installing via SillyTavern Launcher
### For Linux users
1. Open your favorite terminal and install git
2. Download Sillytavern Launcher with: `git clone https://github.com/SillyTavern/SillyTavern-Launcher.git`
3. Navigate to the SillyTavern-Launcher with: `cd SillyTavern-Launcher`
4. Start the install launcher with: `chmod +x install.sh && ./install.sh` and choose what you wanna install
5. After installation start the launcher with: `chmod +x launcher.sh && ./launcher.sh`
### For Mac users
1. Open a terminal and install brew with: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
2. Then install git with: `brew install git`
3. Download Sillytavern Launcher with: `git clone https://github.com/SillyTavern/SillyTavern-Launcher.git`
4. Navigate to the SillyTavern-Launcher with: `cd SillyTavern-Launcher`
5. Start the install launcher with: `chmod +x install.sh && ./install.sh` and choose what you wanna install
6. After installation start the launcher with: `chmod +x launcher.sh && ./launcher.sh`
## 📱 Mobile - Installing via termux
> \[!NOTE]
> **SillyTavern can be run natively on Android phones using Termux. Please refer to this guide by ArroganceComplex#2659:**
> * <https://rentry.org/STAI-Termux>
1. Ensure you have Node.js v18 or higher (the latest [LTS version](https://nodejs.org/en/download/) is recommended) installed by running `node -v`.
Alternatively, use the [Node Version Manager](https://github.com/nvm-sh/nvm#installing-and-updating) script to quickly and easily manage your Node installations.
2. Run the `start.sh` script.
3. Enjoy.
## API keys management ## API keys management
@ -222,7 +245,7 @@ or
CIDR masks are also accepted (eg. 10.0.0.0/24). CIDR masks are also accepted (eg. 10.0.0.0/24).
* Save the `whitelist.txt` file. * Save the `whitelist.txt` file.
* Restart your TAI server. * Restart your ST server.
Now devices which have the IP specified in the file will be able to connect. Now devices which have the IP specified in the file will be able to connect.
@ -293,10 +316,7 @@ You can find them archived here:
<https://files.catbox.moe/1xevnc.zip> <https://files.catbox.moe/1xevnc.zip>
## Screenshots
<img width="400" alt="image" src="https://github.com/SillyTavern/SillyTavern/assets/61471128/e902c7a2-45a6-4415-97aa-c59c597669c1">
<img width="400" alt="image" src="https://github.com/SillyTavern/SillyTavern/assets/61471128/f8a79c47-4fe9-4564-9e4a-bf247ed1c961">
## License and credits ## License and credits
@ -327,3 +347,10 @@ GNU Affero General Public License for more details.**
* Korean translation by @doloroushyeonse * Korean translation by @doloroushyeonse
* k_euler_a support for Horde by <https://github.com/Teashrock> * k_euler_a support for Horde by <https://github.com/Teashrock>
* Chinese translation by [@XXpE3](https://github.com/XXpE3), 中文 ISSUES 可以联系 @XXpE3 * Chinese translation by [@XXpE3](https://github.com/XXpE3), 中文 ISSUES 可以联系 @XXpE3
<!-- LINK GROUP -->
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
[cover]: https://github.com/SillyTavern/SillyTavern/assets/18619528/c2be4c3f-aada-4f64-87a3-ae35a68b61a4
[discord-link]: https://discord.gg/sillytavern
[discord-shield]: https://img.shields.io/discord/1100685673633153084?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
[discord-shield-badge]: https://img.shields.io/discord/1100685673633153084?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge

View File

@ -1,45 +1,78 @@
# This workflow will publish a docker image for every full release to the GitHub package repository # This workflow will publish a docker image for every full release to the GitHub package repository
name: Create Docker Image on Release name: Create Docker Image (Release and Staging)
on: on:
release: release:
# Allow pre-releases # Allow pre-releases
types: [published] types: [published]
schedule:
# Build the staging image everyday at 00:00 UTC
- cron: "0 0 * * *"
env: env:
# This should allow creation of docker images even in forked repositories # This should allow creation of docker images even in forked repositories
# Image name may not contain uppercase characters, so we can not use the repository name IMAGE_NAME: ${{ github.repository }}
# Creates a string like: ghcr.io/SillyTavern/sillytavern REGISTRY: ghcr.io
image_name: ghcr.io/sillytavern/sillytavern
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout # Using the following workaround because currently GitHub Actions
# does not support logical AND/OR operations on triggers
# It's currently not possible to have `branches` under the `schedule` trigger
- name: Checkout the release branch
if: ${{ github.event_name == 'release' }}
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
ref: "release"
# Build docker image using dockerfile and tag it with branch name - name: Checkout the staging branch
# Assumes branch name is the version number if: ${{ github.event_name == 'schedule' }}
- name: Build the Docker image uses: actions/checkout@v3
run: | with:
docker build . --file Dockerfile --tag $image_name:${{ github.ref_name }} ref: "staging"
# Setting up QEMU for multi-arch image build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for the image
uses: docker/metadata-action@v5.5.1
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ github.ref_name }}
# Login into package repository as the person who created the release # Login into package repository as the person who created the release
- name: Login to GitHub Container Registry - name: Log in to the Container registry
uses: docker/login-action@v1 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
# Assumes release is the latest and marks image as such # Build docker image using dockerfile for amd64 and arm64
- name: Docker Tag and Push # Tag it with branch name
# Assumes branch name is the version number
- name: Build and push
uses: docker/build-push-action@v5.3.0
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
# If the workflow is triggered by a release, marks and push the image as such
- name: Docker tag latest and push
if: ${{ github.event_name == 'release' }}
run: | run: |
docker tag $image_name:${{ github.ref_name }} $image_name:latest docker tag $IMAGE_NAME:${{ github.ref_name }} $IMAGE_NAME:latest
docker push $image_name:${{ github.ref_name }} docker push $IMAGE_NAME:latest
docker push $image_name:latest

View File

@ -465,6 +465,7 @@ async function processAudioJobQueue() {
playAudioData(currentAudioJob); playAudioData(currentAudioJob);
talkingAnimation(true); talkingAnimation(true);
} catch (error) { } catch (error) {
toastr.error(error.toString());
console.error(error); console.error(error);
audioQueueProcessorReady = true; audioQueueProcessorReady = true;
} }
@ -581,8 +582,9 @@ async function processTtsQueue() {
toastr.error(`Specified voice for ${char} was not found. Check the TTS extension settings.`); toastr.error(`Specified voice for ${char} was not found. Check the TTS extension settings.`);
throw `Unable to attain voiceId for ${char}`; throw `Unable to attain voiceId for ${char}`;
} }
tts(text, voiceId, char); await tts(text, voiceId, char);
} catch (error) { } catch (error) {
toastr.error(error.toString());
console.error(error); console.error(error);
currentTtsJob = null; currentTtsJob = null;
} }
@ -654,6 +656,7 @@ function onRefreshClick() {
initVoiceMap(); initVoiceMap();
updateVoiceMap(); updateVoiceMap();
}).catch(error => { }).catch(error => {
toastr.error(error.toString());
console.error(error); console.error(error);
setTtsStatus(error, false); setTtsStatus(error, false);
}); });