From b98599fa9c31c134322489d61aae9c0bc74d8aee Mon Sep 17 00:00:00 2001
From: RossAscends <124905043+RossAscends@users.noreply.github.com>
Date: Wed, 10 May 2023 06:35:47 +0900
Subject: [PATCH 1/4] Added Update-Instructions.txt
---
Update-Instructions.txt | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Update-Instructions.txt
diff --git a/Update-Instructions.txt b/Update-Instructions.txt
new file mode 100644
index 000000000..f7f00658a
--- /dev/null
+++ b/Update-Instructions.txt
@@ -0,0 +1,50 @@
+How to Update SillyTavern
+
+Windows/MacOS:
+
+Method 1 - GIT
+
+We always recommend users install using 'git'. Here's why:
+
+When you have installed via `git clone`, all you have to do to update is type `git pull` in a command line in the ST folder.
+The updates are applied automatically and safely.
+
+Method 2 - ZIP
+
+If you insist on installing via a zip, here is the tedious process for doing the update:
+
+1. Download the new release zip.
+2. Unzip it into a folder OUTSIDE of your current ST installation.
+3. Do the usual setup procedure with start.bat to install NodeJS requirements.
+
+4. Copy the following files/folders as necessary(*) from your old ST installation:
+
+ - Backgrounds
+ - Characters
+ - Chats
+ - Groups
+ - Group chats
+ - KoboldAI Settings
+ - NovelAI Settings
+ - OpenAI Settings
+ - TextGen Settings (textgen = ooba)
+ - Themes
+ - User Avatars
+ - Worlds
+ - settings.json
+
+ (*) 'As necessary' = "If you made any custom content related to those folders".
+ None of the folders are mandatory, so only copy what you need.
+
+ **NB: DO NOT COPY THE ENTIRE /PUBLIC/ FOLDER.**
+ Doing so could break the new install and prevent new features from being present.
+
+5. Paste those items into the /Public/ folder of the new install.
+
+6. Run start.bat once again, and pray you got it right. :)
+
+7. If everything shows up, you can safely delete the old ST folder.
+
+Linux/Termux:
+
+You definitely installed via git, so just 'git pull' inside the SillyTavern directory.
From 242d16a9731b4385479daeb6136564961199b189 Mon Sep 17 00:00:00 2001
From: RossAscends <124905043+RossAscends@users.noreply.github.com>
Date: Wed, 10 May 2023 07:04:27 +0900
Subject: [PATCH 2/4] Update instructions in html note & welcome msg
---
public/notes/update.html | 24 ++++++++++++++++
public/notes/update.md | 59 ++++++++++++++++++++++++++++++++++++++++
public/script.js | 30 ++++++++++----------
3 files changed, 99 insertions(+), 14 deletions(-)
create mode 100644 public/notes/update.html
create mode 100644 public/notes/update.md
diff --git a/public/notes/update.html b/public/notes/update.html
new file mode 100644
index 000000000..97e31d5c8
--- /dev/null
+++ b/public/notes/update.html
@@ -0,0 +1,24 @@
+
+
+
+
+ SillyTavern Guidebook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/notes/update.md b/public/notes/update.md
new file mode 100644
index 000000000..0d27e470a
--- /dev/null
+++ b/public/notes/update.md
@@ -0,0 +1,59 @@
+# How to Update SillyTavern
+
+(This file is also present in plain text form inside SillyTavern's base install folder)
+
+----
+
+## Linux/Termux
+
+You definitely installed via git, so just 'git pull' inside the SillyTavern directory.
+
+----
+
+## Windows/MacOS
+
+### Method 1 - GIT
+
+We always recommend users install using 'git'. Here's why:
+
+When you have installed via 'git clone', all you have to do to update is type 'git pull' in a command line in the ST folder.
+The updates are applied automatically and safely.
+
+### Method 2 - ZIP
+
+If you insist on installing via a zip, here is the tedious process for doing the update:
+
+1. Download the new release zip.
+2. Unzip it into a folder OUTSIDE of your current ST installation.
+3. Do the usual setup procedure with start.bat to install NodeJS requirements.
+
+4. Copy the following files/folders as necessary(*) from your old ST installation:
+
+ (*) 'As necessary' = "If you made any custom content related to those folders".
+ None of the folders are mandatory, so only copy what you need.
+
+#### NB: DO NOT COPY THE ENTIRE /PUBLIC/ FOLDER
+
+ Doing so could break the new install and prevent new features from being present.
+
+```plaintext
+Backgrounds
+Characters
+Chats
+Groups
+Group chats
+KoboldAI Settings
+NovelAI Settings
+OpenAI Settings
+TextGen Settings (textgen = ooba)
+Themes
+User Avatars
+Worlds
+settings.json
+```
+
+5. Once those folders/files are copied, Paste them into the /Public/ folder of the new install.
+
+6. Run start.bat once again, and pray you got it right.
+
+7. If everything shows up, you can safely delete the old ST folder.
diff --git a/public/script.js b/public/script.js
index 48a30dad6..ddb451fc6 100644
--- a/public/script.js
+++ b/public/script.js
@@ -284,6 +284,8 @@ const system_messages = {
is_name: true,
mes: [
'
Welcome to SillyTavern!
',
+ '
Want to Update to the latest version?
',
+ "Read the instructions here. Also located in your installation's base folder",
'
In order to begin chatting:
',
'',
'
Connect to one of the supported generation APIs (the plug icon)
',
@@ -378,17 +380,17 @@ async function getClientVersion() {
}
function getTokenCount(str, padding = 0) {
- let tokenizerType = power_user.tokenizer;
+ let tokenizerType = power_user.tokenizer;
if (main_api === 'openai') {
// For main prompt building
if (padding == power_user.token_padding) {
tokenizerType = tokenizers.NONE;
- // For extensions and WI
+ // For extensions and WI
} else {
return getTokenCountOpenAI(str);
}
-
+
}
switch (tokenizerType) {
@@ -971,15 +973,15 @@ function messageFormatting(mes, ch_name, isSystem, isUser) {
.replace(/\*\*(.+?)\*\*/g, "$1")
.replace(/\n/g, " ");
} else if (!isSystem) {
- mes = mes.replace(/```[\s\S]*?```|``[\s\S]*?``|`[\s\S]*?`|(\".+?\")|(\u201C.+?\u201D)/gm, function (match, p1, p2) {
- if (p1) {
- return '"' + p1.replace(/\"/g, "") + '"';
- } else if (p2) {
- return '“' + p2.replace(/\u201C|\u201D/g, "") + '”';
- } else {
- return match;
- }
- });
+ mes = mes.replace(/```[\s\S]*?```|``[\s\S]*?``|`[\s\S]*?`|(\".+?\")|(\u201C.+?\u201D)/gm, function (match, p1, p2) {
+ if (p1) {
+ return '"' + p1.replace(/\"/g, "") + '"';
+ } else if (p2) {
+ return '“' + p2.replace(/\u201C|\u201D/g, "") + '”';
+ } else {
+ return match;
+ }
+ });
mes = mes.replaceAll('\\begin{align*}', '$$');
mes = mes.replaceAll('\\end{align*}', '$$');
mes = converter.makeHtml(mes);
@@ -1831,7 +1833,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
if (main_api == 'openai') {
break;
}
-
+
chatString = item + chatString;
if (canFitMessages()) { //(The number of tokens in the entire promt) need fix, it must count correctly (added +120, so that the description of the character does not hide)
//if (is_pygmalion && i == chat2.length-1) item='\n'+item;
@@ -2479,7 +2481,7 @@ function cleanUpMessage(getMessage, isImpersonate) {
getMessage = getMessage.replace(/You:/g, name1 + ':');
}
- let nameToTrim = isImpersonate ? name2 : name1;
+ let nameToTrim = isImpersonate ? name2 : name1;
if (isImpersonate) {
nameToTrim = power_user.allow_name2_display ? '' : name2;
From 2dfa59f98038ca3a5ff6d51781f00e25d465b322 Mon Sep 17 00:00:00 2001
From: RossAscends <124905043+RossAscends@users.noreply.github.com>
Date: Wed, 10 May 2023 07:39:24 +0900
Subject: [PATCH 3/4] update to update instructions.
---
Update-Instructions.txt | 16 +++++++++-------
public/notes/update.md | 5 +++--
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Update-Instructions.txt b/Update-Instructions.txt
index f7f00658a..ad01c6a8c 100644
--- a/Update-Instructions.txt
+++ b/Update-Instructions.txt
@@ -1,5 +1,11 @@
How to Update SillyTavern
+This guide assumes you have already installed SillyTavern once, and know how to run it on your OS.
+
+Linux/Termux:
+
+You definitely installed via git, so just 'git pull' inside the SillyTavern directory.
+
Windows/MacOS:
Method 1 - GIT
@@ -15,7 +21,7 @@ If you insist on installing via a zip, here is the tedious process for doing the
1. Download the new release zip.
2. Unzip it into a folder OUTSIDE of your current ST installation.
-3. Do the usual setup procedure with start.bat to install NodeJS requirements.
+3. Do the usual setup procedure for your OS to install the NodeJS requirements.
4. Copy the following files/folders as necessary(*) from your old ST installation:
@@ -41,10 +47,6 @@ If you insist on installing via a zip, here is the tedious process for doing the
5. Paste those items into the /Public/ folder of the new install.
-6. Run start.bat once again, and pray you got it right. :)
+6. Start SillyTavern once again with the method appropriate to your OS, and pray you got it right.
-7. If everything shows up, you can safely delete the old ST folder.
-
-Linux/Termux:
-
-You definitely installed via git, so just 'git pull' inside the SillyTavern directory.
+7. If everything shows up, you can safely delete the old ST folder.
\ No newline at end of file
diff --git a/public/notes/update.md b/public/notes/update.md
index 0d27e470a..bedbf491e 100644
--- a/public/notes/update.md
+++ b/public/notes/update.md
@@ -1,5 +1,6 @@
# How to Update SillyTavern
+(This guide assumes you have already installed SillyTavern once and know how to run it on your OS.)
(This file is also present in plain text form inside SillyTavern's base install folder)
----
@@ -25,7 +26,7 @@ If you insist on installing via a zip, here is the tedious process for doing the
1. Download the new release zip.
2. Unzip it into a folder OUTSIDE of your current ST installation.
-3. Do the usual setup procedure with start.bat to install NodeJS requirements.
+3. Do the usual setup procedure for your OS to install NodeJS requirements.
4. Copy the following files/folders as necessary(*) from your old ST installation:
@@ -54,6 +55,6 @@ settings.json
5. Once those folders/files are copied, Paste them into the /Public/ folder of the new install.
-6. Run start.bat once again, and pray you got it right.
+6. Start SillyTavern once again with the method appropriate to your OS, and pray you got it right.
7. If everything shows up, you can safely delete the old ST folder.
From 681b6d1f099c40bb23084d2822ec215e0182c26f Mon Sep 17 00:00:00 2001
From: RossAscends <124905043+RossAscends@users.noreply.github.com>
Date: Wed, 10 May 2023 07:57:39 +0900
Subject: [PATCH 4/4] +Alpin install install guide link in update note
---
Update-Instructions.txt | 3 +++
public/notes/update.md | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/Update-Instructions.txt b/Update-Instructions.txt
index ad01c6a8c..e8c88cd9b 100644
--- a/Update-Instructions.txt
+++ b/Update-Instructions.txt
@@ -1,5 +1,8 @@
How to Update SillyTavern
+This is not an installation guide. If you need installation instructions, look here:
+https://docs.alpindale.dev/pygmalion-extras/sillytavern/#installation
+
This guide assumes you have already installed SillyTavern once, and know how to run it on your OS.
Linux/Termux:
diff --git a/public/notes/update.md b/public/notes/update.md
index bedbf491e..e1781d4ac 100644
--- a/public/notes/update.md
+++ b/public/notes/update.md
@@ -1,7 +1,11 @@
# How to Update SillyTavern
+This is not an installation guide. If you need installation instructions, look here:
+
+
(This guide assumes you have already installed SillyTavern once and know how to run it on your OS.)
-(This file is also present in plain text form inside SillyTavern's base install folder)
+
+(A plain text copy of this file is also present inside SillyTavern's base install folder.)
----