Compare commits

...

12 Commits
1.7.1 ... 1.7.2

Author SHA1 Message Date
Cohee
3b99f7839b Bump package version 2023-06-29 01:10:04 +03:00
Cohee
7c6c2ee8b6 Fix Poe 2023-06-29 01:09:34 +03:00
Cohee
c873a6b04c Fix npm audit. 2023-06-23 13:53:37 +03:00
Cohee
d4332aa7ec No audit to npm install 2023-06-22 20:50:01 +03:00
Cohee
267db5166f Merge pull request #550 from v86861062/main
start.sh: Fixed the commands
2023-06-22 12:41:28 +03:00
v86861062
0e45450912 start.sh: Fixed the commands
Signed-off-by: v86861062 <v86861062@gmail.com>
2023-06-22 12:19:35 +08:00
Cohee
a37922ad59 Merge pull request #544 from BlipRanger/patch-3 2023-06-21 09:57:44 +03:00
BlipRanger
e4a6bdb389 Update readme.md
Add BlipRanger
2023-06-20 20:33:46 -04:00
RossAscends
a43f99b492 new base themes 2023-06-18 23:57:30 +09:00
Cohee
c890da2877 Fix server crash when KoboldCpp server goes offline and stop is clicked 2023-06-16 14:11:52 +03:00
Cohee
bec6227aaf Merge branch 'main' of https://github.com/SillyLossy/TavernAI 2023-06-16 12:55:08 +03:00
Cohee
6a2a0efc84 Don't run streaming with Kobold on quiet gens #504 2023-06-16 12:55:02 +03:00
11 changed files with 72 additions and 26 deletions

1
.github/readme.md vendored
View File

@@ -293,6 +293,7 @@ GNU Affero General Public License for more details.**
* Cohee's modifications and derived code: AGPL v3
* RossAscends' additions: AGPL v3
* Portions of CncAnon's TavernAITurbo mod: Unknown license
* BlipRanger's miscellaneous UI & extension modifications (<https://github.com/BlipRanger>)
* Waifu mode inspired by the work of PepperTaco (<https://github.com/peppertaco/Tavern/>)
* Thanks Pygmalion University for being awesome testers and suggesting cool features!
* Thanks oobabooga for compiling presets for TextGen

View File

@@ -1,5 +1,5 @@
pushd %~dp0
call npm install
call npm install --no-audit
node server.js
pause
popd
popd

10
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "sillytavern",
"version": "1.7.1",
"version": "1.7.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sillytavern",
"version": "1.7.1",
"version": "1.7.2",
"license": "AGPL-3.0",
"dependencies": {
"@dqbd/tiktoken": "^1.0.2",
@@ -3035,9 +3035,9 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"node_modules/semver": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
"integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"

View File

@@ -48,7 +48,7 @@
"type": "git",
"url": "https://github.com/SillyTavern/SillyTavern.git"
},
"version": "1.7.1",
"version": "1.7.2",
"scripts": {
"start": "node server.js",
"pkg": "pkg --compress Gzip --no-bytecode --public ."

View File

@@ -2279,7 +2279,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
if (preset_settings != 'gui') {
const maxContext = (adjustedParams && horde_settings.auto_adjust_context_length) ? adjustedParams.maxContextLength : max_context;
generate_data = getKoboldGenerationData(finalPromt, this_settings, this_amount_gen, maxContext, isImpersonate);
generate_data = getKoboldGenerationData(finalPromt, this_settings, this_amount_gen, maxContext, isImpersonate, type);
}
}
else if (main_api == 'textgenerationwebui') {

View File

@@ -68,7 +68,7 @@ function loadKoboldSettings(preset) {
}
}
function getKoboldGenerationData(finalPromt, this_settings, this_amount_gen, this_max_context, isImpersonate) {
function getKoboldGenerationData(finalPromt, this_settings, this_amount_gen, this_max_context, isImpersonate, type) {
let generate_data = {
prompt: finalPromt,
gui_settings: false,
@@ -94,7 +94,7 @@ function getKoboldGenerationData(finalPromt, this_settings, this_amount_gen, thi
use_world_info: false,
singleline: kai_settings.single_line,
stop_sequence: kai_settings.use_stop_sequence ? getStoppingStrings(isImpersonate, false) : undefined,
streaming: kai_settings.streaming_kobold && kai_settings.can_use_streaming,
streaming: kai_settings.streaming_kobold && kai_settings.can_use_streaming && type !== 'quiet',
can_abort: kai_settings.can_use_streaming,
};
return generate_data;

View File

@@ -0,0 +1,21 @@
{
"name": "Default (Dark) 1.7.1",
"blur_strength": 10,
"main_text_color": "rgba(220, 220, 210, 1)",
"italics_text_color": "rgba(145, 145, 145, 1)",
"quote_text_color": "rgba(225, 138, 36, 1)",
"blur_tint_color": "rgba(23, 23, 23, 1)",
"user_mes_blur_tint_color": "rgba(0, 0, 0, 0.9)",
"bot_mes_blur_tint_color": "rgba(0, 0, 0, 0.9)",
"shadow_color": "rgba(0, 0, 0, 1)",
"shadow_width": 2,
"font_scale": 1,
"fast_ui_mode": true,
"waifuMode": false,
"avatar_style": 0,
"chat_display": 0,
"noShadows": true,
"sheld_width": 0,
"timer_enabled": false,
"hotswap_enabled": true
}

View File

@@ -0,0 +1,21 @@
{
"name": "Ross v2",
"blur_strength": 10,
"main_text_color": "rgba(230, 230, 220, 1)",
"italics_text_color": "rgba(145, 145, 145, 1)",
"quote_text_color": "rgba(73, 179, 255, 0.91)",
"blur_tint_color": "rgba(0, 0, 0, 0.5)",
"user_mes_blur_tint_color": "rgba(51, 51, 51, 0.2)",
"bot_mes_blur_tint_color": "rgba(97, 97, 97, 0.43)",
"shadow_color": "rgba(0, 0, 0, 0.5)",
"shadow_width": 2,
"font_scale": 0.95,
"fast_ui_mode": false,
"waifuMode": false,
"avatar_style": 1,
"chat_display": 1,
"noShadows": false,
"sheld_width": 1,
"timer_enabled": true,
"hotswap_enabled": true
}

View File

@@ -357,14 +357,17 @@ app.post("/generate", jsonParser, async function (request, response_generate = r
request.socket.on('close', async function () {
if (request.body.can_abort && !response_generate.finished) {
try {
console.log('Aborting Kobold generation...');
// send abort signal to koboldcpp
await fetch(`${api_server}/extra/abort`, {
const abortResponse = await fetch(`${api_server}/extra/abort`, {
method: 'POST',
});
} catch {
if ('status' in error) {
console.log('Status Code from Kobold:', error.status);
if (!abortResponse.ok) {
console.log('Error sending abort request to Kobold:', abortResponse.status);
}
} catch (error) {
console.log(error);
}
}
controller.abort();

View File

@@ -369,13 +369,13 @@ class Client {
const nextData = JSON.parse(jsonText);
this.formkey = extractFormKey(r.data);
this.viewer = nextData.props.pageProps.payload.viewer;
this.viewer = nextData.props.pageProps.data.viewer;
return nextData;
}
async get_bots() {
const viewer = this.next_data.props.pageProps.payload.viewer;
const viewer = this.next_data.props.pageProps.data.viewer;
if (!viewer.availableBotsConnection) {
throw new Error('Invalid token.');
}
@@ -398,7 +398,7 @@ class Client {
cached_bots[url] = r;
}
const chatData = r.data.pageProps.payload.chatOfBotDisplayName;
const chatData = r.data.pageProps.data.chatOfBotDisplayName;
bots[chatData.defaultBotObject.nickname] = chatData;
resolve();

View File

@@ -3,19 +3,19 @@
if ! command -v npm &> /dev/null
then
read -p "npm is not installed. Do you want to install nodejs and npm? (y/n)" choice
case "$choice" in
y|Y )
case "$choice" in
y|Y )
echo "Installing nvm..."
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
nvm install lts
nvm use lts;;
n|N )
nvm install --lts
nvm use --lts;;
n|N )
echo "Nodejs and npm will not be installed."
exit;;
* )
* )
echo "Invalid option. Nodejs and npm will not be installed."
exit;;
esac
@@ -28,7 +28,7 @@ if [ ! -z "$REPL_ID" ]; then
fi
echo "Installing Node Modules..."
npm i
npm i --no-audit
echo "Entering SillyTavern..."
node "$(dirname "$0")/server.js"
node "$(dirname "$0")/server.js"