sillytavern 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/readme.md +40 -0
- package/.github/workflows/docker-publish.yml +7 -9
- package/.github/workflows/update-i18n.yaml +33 -0
- package/docker/docker-compose.yml +1 -0
- package/package.json +7 -5
- package/public/css/mobile-styles.css +5 -0
- package/public/css/promptmanager.css +1 -1
- package/public/css/select2-overrides.css +10 -0
- package/public/css/st-tailwind.css +20 -0
- package/public/css/world-info.css +5 -0
- package/public/global.d.ts +41 -0
- package/public/index.html +393 -322
- package/public/lib/eventemitter.js +2 -2
- package/public/locales/ar-sa.json +1236 -700
- package/public/locales/de-de.json +1236 -700
- package/public/locales/es-es.json +1236 -697
- package/public/locales/fr-fr.json +1236 -697
- package/public/locales/is-is.json +1236 -698
- package/public/locales/it-it.json +1236 -700
- package/public/locales/ja-jp.json +1236 -697
- package/public/locales/ko-kr.json +1227 -713
- package/public/locales/nl-nl.json +1236 -700
- package/public/locales/pt-pt.json +1236 -698
- package/public/locales/ru-ru.json +1225 -948
- package/public/locales/uk-ua.json +1236 -697
- package/public/locales/vi-vn.json +1236 -698
- package/public/locales/zh-cn.json +1240 -699
- package/public/locales/zh-tw.json +1409 -1143
- package/public/script.js +277 -155
- package/public/scripts/BulkEditOverlay.js +2 -19
- package/public/scripts/PromptManager.js +21 -66
- package/public/scripts/RossAscends-mods.js +88 -97
- package/public/scripts/bookmarks.js +2 -0
- package/public/scripts/char-data.js +19 -0
- package/public/scripts/chats.js +126 -37
- package/public/scripts/extensions/assets/market.html +2 -2
- package/public/scripts/extensions/attachments/index.js +288 -2
- package/public/scripts/extensions/attachments/manager.html +23 -2
- package/public/scripts/extensions/attachments/style.css +24 -0
- package/public/scripts/extensions/caption/index.js +7 -97
- package/public/scripts/extensions/caption/settings.html +90 -0
- package/public/scripts/extensions/expressions/index.js +68 -6
- package/public/scripts/extensions/expressions/settings.html +1 -1
- package/public/scripts/extensions/memory/index.js +1 -0
- package/public/scripts/extensions/quick-reply/src/ui/SettingsUi.js +1 -0
- package/public/scripts/extensions/regex/dropdown.html +35 -7
- package/public/scripts/extensions/regex/editor.html +1 -1
- package/public/scripts/extensions/regex/embeddedScripts.html +5 -0
- package/public/scripts/extensions/regex/engine.js +20 -3
- package/public/scripts/extensions/regex/importTarget.html +19 -0
- package/public/scripts/extensions/regex/index.js +261 -64
- package/public/scripts/extensions/regex/scriptTemplate.html +6 -0
- package/public/scripts/extensions/regex/style.css +54 -1
- package/public/scripts/extensions/shared.js +18 -17
- package/public/scripts/extensions/stable-diffusion/button.html +4 -0
- package/public/scripts/extensions/stable-diffusion/comfyWorkflowEditor.html +1 -0
- package/public/scripts/extensions/stable-diffusion/dropdown.html +12 -0
- package/public/scripts/extensions/stable-diffusion/index.js +248 -72
- package/public/scripts/extensions/stable-diffusion/settings.html +107 -74
- package/public/scripts/extensions/translate/index.js +21 -1
- package/public/scripts/extensions/tts/azure.js +207 -0
- package/public/scripts/extensions/tts/edge.js +1 -0
- package/public/scripts/extensions/tts/gsvi.js +267 -0
- package/public/scripts/extensions/tts/index.js +4 -0
- package/public/scripts/extensions/tts/novel.js +1 -0
- package/public/scripts/extensions/tts/speecht5.js +1 -0
- package/public/scripts/extensions/vectors/index.js +247 -45
- package/public/scripts/extensions/vectors/settings.html +55 -12
- package/public/scripts/extensions.js +2 -0
- package/public/scripts/group-chats.js +12 -5
- package/public/scripts/i18n.js +4 -3
- package/public/scripts/macros.js +5 -2
- package/public/scripts/openai.js +168 -5
- package/public/scripts/personas.js +77 -18
- package/public/scripts/popup.js +8 -7
- package/public/scripts/power-user.js +111 -21
- package/public/scripts/scrapers.js +51 -6
- package/public/scripts/secrets.js +1 -0
- package/public/scripts/slash-commands/SlashCommand.js +6 -1
- package/public/scripts/slash-commands/SlashCommandArgument.js +2 -2
- package/public/scripts/slash-commands/SlashCommandParser.js +1 -1
- package/public/scripts/slash-commands.js +225 -85
- package/public/scripts/tags.js +21 -6
- package/public/scripts/templates/formatting.html +1 -0
- package/public/scripts/templates/importCharacters.html +22 -0
- package/public/scripts/templates/promptManagerExportForCharacter.html +4 -0
- package/public/scripts/templates/promptManagerExportPopup.html +12 -0
- package/public/scripts/templates/promptManagerFooter.html +11 -0
- package/public/scripts/templates/promptManagerHeader.html +12 -0
- package/public/scripts/templates/promptManagerListHeader.html +8 -0
- package/public/scripts/templates/snapshotsView.html +2 -2
- package/public/scripts/templates/userProfile.html +14 -14
- package/public/scripts/templates/welcome.html +14 -2
- package/public/scripts/textgen-settings.js +38 -0
- package/public/scripts/tokenizers.js +1 -1
- package/public/scripts/utils.js +138 -25
- package/public/scripts/variables.js +12 -13
- package/public/scripts/world-info.js +90 -51
- package/public/style.css +409 -137
- package/server.js +3 -0
- package/src/additional-headers.js +16 -4
- package/src/character-card-parser.js +21 -13
- package/src/constants.js +1 -0
- package/src/endpoints/azure.js +92 -0
- package/src/endpoints/backends/chat-completions.js +52 -8
- package/src/endpoints/backends/kobold.js +55 -2
- package/src/endpoints/characters.js +40 -3
- package/src/endpoints/chats.js +7 -10
- package/src/endpoints/content-manager.js +43 -0
- package/src/endpoints/files.js +16 -0
- package/src/endpoints/google.js +7 -3
- package/src/endpoints/groups.js +2 -2
- package/src/endpoints/horde.js +13 -12
- package/src/endpoints/novelai.js +2 -2
- package/src/endpoints/secrets.js +1 -0
- package/src/endpoints/settings.js +6 -10
- package/src/endpoints/stable-diffusion.js +47 -3
- package/src/endpoints/tokenizers.js +11 -2
- package/src/endpoints/vectors.js +85 -18
- package/src/prompt-converters.js +79 -2
- package/src/users.js +1 -0
- package/src/util.js +7 -7
- package/src/validator/TavernCardValidator.js +52 -8
- package/src/vectors/llamacpp-vectors.js +61 -0
- package/src/vectors/ollama-vectors.js +69 -0
package/.github/readme.md
CHANGED
|
@@ -196,6 +196,45 @@ For MacOS / Linux all of these will be done in a Terminal.
|
|
|
196
196
|
5. Start the install launcher with: `chmod +x install.sh && ./install.sh` and choose what you wanna install
|
|
197
197
|
6. After installation start the launcher with: `chmod +x launcher.sh && ./launcher.sh`
|
|
198
198
|
|
|
199
|
+
## 🐋 Installing via Docker
|
|
200
|
+
|
|
201
|
+
These instructions assume you have installed Docker, are able to access your command line for the installation of containers, and familiar with their general operation.
|
|
202
|
+
|
|
203
|
+
### Building the image yourself
|
|
204
|
+
|
|
205
|
+
We have a comprehensive guide on using SillyTavern in Docker [here](http://docs.sillytavern.app/installation/docker/) which covers installations on Windows, macOS and Linux! Give it a read if you wish to build the image yourself.
|
|
206
|
+
|
|
207
|
+
### Using the GitHub Container Registry (easiest)
|
|
208
|
+
|
|
209
|
+
You will need two mandatory directory mappings and a port mapping to allow SillyTavern to function. In the command, replace your selections in the following places:
|
|
210
|
+
|
|
211
|
+
#### Container Variables
|
|
212
|
+
|
|
213
|
+
##### Volume Mappings
|
|
214
|
+
|
|
215
|
+
- [config] - The directory where SillyTavern configuration files will be stored on your host machine
|
|
216
|
+
- [data] - The directory where SillyTavern user data (including characters) will be stored on your host machine
|
|
217
|
+
- [plugins] - (optional) The directory where SillyTavern server plugins will be stored on your host machine
|
|
218
|
+
|
|
219
|
+
##### Port Mappings
|
|
220
|
+
|
|
221
|
+
- [PublicPort] - The port to expose the traffic on. This is mandatory, as you will be accessing the instance from outside of its virtual machine container. DO NOT expose this to the internet without implementing a separate service for security.
|
|
222
|
+
|
|
223
|
+
##### Additional Settings
|
|
224
|
+
|
|
225
|
+
- [TimeZone] - The timezone your instance should use. This is useful for making logs match your local time for easier troubleshooting. Use your TZ Identifier. (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
|
|
226
|
+
- [DockerNet] - The docker network that the container should be created with a connection to. If you don't know what it is, see the [official Docker documentation](https://docs.docker.com/reference/cli/docker/network/).
|
|
227
|
+
- [version] - On the right-hand side of this GitHub page, you'll see "Packages". Select the "sillytavern" package and you'll see the image versions. The image tag "latest" will keep you up-to-date with the current release. You can also utilize "staging" and "release" tags that point to the nightly images of the respective branches, but this may not be appropriate, if you are utilizing extensions that could be broken, and may need time to update.
|
|
228
|
+
|
|
229
|
+
#### Install command
|
|
230
|
+
|
|
231
|
+
1. Open your Command Line
|
|
232
|
+
2. Run the following command
|
|
233
|
+
|
|
234
|
+
`docker create --name='sillytavern' --net='[DockerNet]' -e TZ="[TimeZone]" -p '8000:8000/tcp' -v '[plugins]':'/home/node/app/plugins':'rw' -v '[config]':'/home/node/app/config':'rw' -v '[data]':'/home/node/app/data':'rw' 'ghcr.io/sillytavern/sillytavern:[version]'`
|
|
235
|
+
|
|
236
|
+
> Note that 8000 is a default listening port. Don't forget to use an appropriate port if you change it in the config.
|
|
237
|
+
|
|
199
238
|
## 📱 Mobile - Installing via termux
|
|
200
239
|
|
|
201
240
|
> \[!NOTE]
|
|
@@ -347,6 +386,7 @@ GNU Affero General Public License for more details.**
|
|
|
347
386
|
* Korean translation by @doloroushyeonse
|
|
348
387
|
* k_euler_a support for Horde by <https://github.com/Teashrock>
|
|
349
388
|
* Chinese translation by [@XXpE3](https://github.com/XXpE3), 中文 ISSUES 可以联系 @XXpE3
|
|
389
|
+
* Docker guide by [@mrguymiah](https://github.com/mrguymiah) and [@Bronya-Rand](https://github.com/Bronya-Rand)
|
|
350
390
|
|
|
351
391
|
<!-- LINK GROUP -->
|
|
352
392
|
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
run: |
|
|
31
31
|
echo "IMAGE_NAME=${REPO,,}" >> ${GITHUB_ENV}
|
|
32
32
|
|
|
33
|
-
# Using the following workaround because currently GitHub Actions
|
|
33
|
+
# Using the following workaround because currently GitHub Actions
|
|
34
34
|
# does not support logical AND/OR operations on triggers
|
|
35
35
|
# It's currently not possible to have `branches` under the `schedule` trigger
|
|
36
36
|
- name: Checkout the release branch (on release)
|
|
@@ -65,7 +65,12 @@ jobs:
|
|
|
65
65
|
id: metadata
|
|
66
66
|
with:
|
|
67
67
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
68
|
-
|
|
68
|
+
# Release version tag if the workflow is triggered by a release
|
|
69
|
+
# Branch name tag if the workflow is triggered by a push
|
|
70
|
+
# Latest tag if the branch is release and the workflow is triggered by a push
|
|
71
|
+
tags: |
|
|
72
|
+
${{ github.event_name == 'release' && github.ref_name || env.BRANCH_NAME }}
|
|
73
|
+
${{ github.event_name == 'push' && env.BRANCH_NAME == 'release' && 'latest' || '' }}
|
|
69
74
|
|
|
70
75
|
# Login into package repository as the person who created the release
|
|
71
76
|
- name: Log in to the Container registry
|
|
@@ -87,10 +92,3 @@ jobs:
|
|
|
87
92
|
push: true
|
|
88
93
|
tags: ${{ steps.metadata.outputs.tags }}
|
|
89
94
|
labels: ${{ steps.metadata.outputs.labels }}
|
|
90
|
-
|
|
91
|
-
# If the workflow is triggered by a release, marks and push the image as such
|
|
92
|
-
- name: Docker tag latest and push
|
|
93
|
-
if: ${{ github.event_name == 'release' }}
|
|
94
|
-
run: |
|
|
95
|
-
docker tag $IMAGE_NAME:${{ github.ref_name }} $IMAGE_NAME:latest
|
|
96
|
-
docker push $IMAGE_NAME:latest
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Update i18n data
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
permissions: # Job-level permissions configuration starts here
|
|
10
|
+
contents: write # 'write' access to repository contents
|
|
11
|
+
steps:
|
|
12
|
+
- name: disable auto crlf
|
|
13
|
+
uses: steve02081504/disable-autocrlf@v1
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
ref: ${{ github.head_ref }}
|
|
17
|
+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
|
|
18
|
+
- name: Create local changes
|
|
19
|
+
run: |
|
|
20
|
+
aria2c https://raw.githubusercontent.com/SillyTavern/SillyTavern-i18n/main/generate.py
|
|
21
|
+
aria2c https://raw.githubusercontent.com/SillyTavern/SillyTavern-i18n/main/requirements.txt
|
|
22
|
+
pip install -r ./requirements.txt
|
|
23
|
+
python ./generate.py "" --sort-keys
|
|
24
|
+
rm -f ./generate.py ./requirements.txt
|
|
25
|
+
- name: add all
|
|
26
|
+
run: git add -A
|
|
27
|
+
- name: push
|
|
28
|
+
uses: actions-go/push@master
|
|
29
|
+
with:
|
|
30
|
+
author-email: 41898282+github-actions[bot]@users.noreply.github.com
|
|
31
|
+
author-name: github-actions[bot]
|
|
32
|
+
commit-message: 'i18n changes'
|
|
33
|
+
remote: origin
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@agnai/sentencepiece-js": "^1.1.1",
|
|
4
4
|
"@agnai/web-tokenizers": "^0.1.3",
|
|
5
|
-
"@zeldafan0225/ai_horde": "^
|
|
5
|
+
"@zeldafan0225/ai_horde": "^5.1.0",
|
|
6
6
|
"archiver": "^7.0.1",
|
|
7
7
|
"bing-translate-api": "^2.9.1",
|
|
8
8
|
"body-parser": "^1.20.2",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"express": "^4.19.2",
|
|
16
16
|
"form-data": "^4.0.0",
|
|
17
17
|
"google-translate-api-browser": "^3.0.1",
|
|
18
|
-
"gpt3-tokenizer": "^1.1.5",
|
|
19
18
|
"he": "^1.2.0",
|
|
20
19
|
"helmet": "^7.1.0",
|
|
21
20
|
"ip-matching": "^2.1.2",
|
|
@@ -44,6 +43,9 @@
|
|
|
44
43
|
"yargs": "^17.7.1",
|
|
45
44
|
"yauzl": "^2.10.0"
|
|
46
45
|
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">= 18"
|
|
48
|
+
},
|
|
47
49
|
"overrides": {
|
|
48
50
|
"parse-bmfont-xml": {
|
|
49
51
|
"xml2js": "^0.5.0"
|
|
@@ -57,8 +59,8 @@
|
|
|
57
59
|
"axios": {
|
|
58
60
|
"follow-redirects": "^1.15.4"
|
|
59
61
|
},
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
+
"node-fetch": {
|
|
63
|
+
"whatwg-url": "^14.0.0"
|
|
62
64
|
}
|
|
63
65
|
},
|
|
64
66
|
"name": "sillytavern",
|
|
@@ -68,7 +70,7 @@
|
|
|
68
70
|
"type": "git",
|
|
69
71
|
"url": "https://github.com/SillyTavern/SillyTavern.git"
|
|
70
72
|
},
|
|
71
|
-
"version": "1.12.
|
|
73
|
+
"version": "1.12.1",
|
|
72
74
|
"scripts": {
|
|
73
75
|
"start": "node server.js",
|
|
74
76
|
"start:no-csrf": "node server.js --disableCsrf",
|
|
@@ -199,6 +199,8 @@ span.select2.select2-container .select2-selection__choice__remove:hover {
|
|
|
199
199
|
transition: background-color 0.3s;
|
|
200
200
|
color: var(--SmartThemeBodyColor);
|
|
201
201
|
background-color: var(--black50a);
|
|
202
|
+
white-space: break-spaces;
|
|
203
|
+
word-break: break-all;
|
|
202
204
|
}
|
|
203
205
|
|
|
204
206
|
.select2_choice_clickable_buttonstyle+span.select2-container .select2-selection__choice__display:hover {
|
|
@@ -218,6 +220,14 @@ span.select2.select2-container .select2-selection__choice__remove:hover {
|
|
|
218
220
|
/* Fix weird styling choice or huge margin around selected options */
|
|
219
221
|
margin-block-start: 2px;
|
|
220
222
|
margin-block-end: 2px;
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
flex-wrap: wrap;
|
|
226
|
+
row-gap: 5px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.select2_multi_sameline+span.select2-container .select2-selection--multiple .select2-selection__choice {
|
|
230
|
+
margin-top: 0px;
|
|
221
231
|
}
|
|
222
232
|
|
|
223
233
|
.select2_multi_sameline+span.select2-container .select2-selection--multiple .select2-search__field {
|
|
@@ -572,3 +572,23 @@ textarea:disabled {
|
|
|
572
572
|
text-align: center;
|
|
573
573
|
padding: 5px;
|
|
574
574
|
}
|
|
575
|
+
|
|
576
|
+
ul.li-padding-b-1 li {
|
|
577
|
+
padding-bottom: 1em;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
ul.li-padding-b-2 li {
|
|
581
|
+
padding-bottom: 2em;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
ul.li-padding-b-5 li {
|
|
585
|
+
padding-bottom: 5em;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
ul.li-padding-bot5 li {
|
|
589
|
+
padding-bottom: 5px;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
ul.li-padding-bot10 li {
|
|
593
|
+
padding-bottom: 10px;
|
|
594
|
+
}
|
package/public/global.d.ts
CHANGED
|
@@ -1358,3 +1358,44 @@ declare namespace moment {
|
|
|
1358
1358
|
declare global {
|
|
1359
1359
|
const moment: typeof moment;
|
|
1360
1360
|
}
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* Callback data for the `LLM_FUNCTION_TOOL_REGISTER` event type that is triggered when a function tool can be registered.
|
|
1364
|
+
*/
|
|
1365
|
+
interface FunctionToolRegister {
|
|
1366
|
+
/**
|
|
1367
|
+
* The type of generation that is being used
|
|
1368
|
+
*/
|
|
1369
|
+
type?: string;
|
|
1370
|
+
/**
|
|
1371
|
+
* Generation data, including messages and sampling parameters
|
|
1372
|
+
*/
|
|
1373
|
+
data: Record<string, object>;
|
|
1374
|
+
/**
|
|
1375
|
+
* Callback to register an LLM function tool.
|
|
1376
|
+
*/
|
|
1377
|
+
registerFunctionTool: typeof registerFunctionTool;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Callback data for the `LLM_FUNCTION_TOOL_REGISTER` event type that is triggered when a function tool is registered.
|
|
1382
|
+
* @param name Name of the function tool to register
|
|
1383
|
+
* @param description Description of the function tool
|
|
1384
|
+
* @param params JSON schema for the parameters of the function tool
|
|
1385
|
+
* @param required Whether the function tool should be forced to be used
|
|
1386
|
+
*/
|
|
1387
|
+
declare function registerFunctionTool(name: string, description: string, params: object, required: boolean): Promise<void>;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* Callback data for the `LLM_FUNCTION_TOOL_CALL` event type that is triggered when a function tool is called.
|
|
1391
|
+
*/
|
|
1392
|
+
interface FunctionToolCall {
|
|
1393
|
+
/**
|
|
1394
|
+
* Name of the function tool to call
|
|
1395
|
+
*/
|
|
1396
|
+
name: string;
|
|
1397
|
+
/**
|
|
1398
|
+
* JSON object with the parameters to pass to the function tool
|
|
1399
|
+
*/
|
|
1400
|
+
arguments: string;
|
|
1401
|
+
}
|