mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
@1.2.7
The bug with multigen 100+ token has been fixed. The replacement of <USER>, {{user}}, <BOT>, {{char}} in Description, First message, Personality Summary and Scenario has been added. Added full Markdown support. The behavior of scrolling the chat to the cursor when editing a message has been fixed. The offline functionality of TavernAI has been fixed.
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
"sharp": "^0.31.3"
|
"sharp": "^0.31.3"
|
||||||
},
|
},
|
||||||
"name": "TavernAI",
|
"name": "TavernAI",
|
||||||
"version": "1.2.6",
|
"version": "1.2.7",
|
||||||
"bin": {
|
"bin": {
|
||||||
"TavernAI": "server.js"
|
"TavernAI": "server.js"
|
||||||
},
|
},
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<script src="scripts/jquery-3.5.1.min.js"></script>
|
<script src="scripts/jquery-3.5.1.min.js"></script>
|
||||||
<script src="scripts/jquery.transit.min.js"></script>
|
<script src="scripts/jquery.transit.min.js"></script>
|
||||||
|
<script src="scripts/showdown.min.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="style.css">
|
<link rel="stylesheet" type="text/css" href="style.css">
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
<link rel="stylesheet" href="css/right-nav-style.css">
|
<link rel="stylesheet" href="css/right-nav-style.css">
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
<script type=module>
|
<script type=module>
|
||||||
import {encode, decode} from "../scripts/gpt-2-3-tokenizer/mod.js";
|
import {encode, decode} from "../scripts/gpt-2-3-tokenizer/mod.js";
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
const VERSION = '1.2.6';
|
const VERSION = '1.2.7';
|
||||||
//var converter = new showdown.Converter();
|
var converter = new showdown.Converter();
|
||||||
var bg_menu_toggle = false;
|
var bg_menu_toggle = false;
|
||||||
var default_user_name = "You";
|
var default_user_name = "You";
|
||||||
var name1 = default_user_name;
|
var name1 = default_user_name;
|
||||||
@@ -450,9 +450,10 @@
|
|||||||
}
|
}
|
||||||
function messageFormating(mes, ch_name){
|
function messageFormating(mes, ch_name){
|
||||||
if(this_chid != undefined) mes = mes.replaceAll("<", "<").replaceAll(">", ">");
|
if(this_chid != undefined) mes = mes.replaceAll("<", "<").replaceAll(">", ">");
|
||||||
mes = mes.replace(/\*\*(.+?)\*\*/g, '<b>$1</b>').replace(/\*(.+?)\*/g, '<i>$1</i>').replace(/\n/g, '<br/>');
|
//mes = mes.replace(/\*\*(.+?)\*\*/g, '<b>$1</b>').replace(/\*(.+?)\*/g, '<i>$1</i>').replace(/\n/g, '<br/>');
|
||||||
|
|
||||||
|
mes = converter.makeHtml(mes);
|
||||||
mes = mes.replace(/\n/g, '<br/>');
|
mes = mes.replace(/\n/g, '<br/>');
|
||||||
//mes = converter.makeHtml(mes);
|
|
||||||
if(ch_name !== name1){
|
if(ch_name !== name1){
|
||||||
mes = mes.replaceAll(name2+":", "");
|
mes = mes.replaceAll(name2+":", "");
|
||||||
}
|
}
|
||||||
@@ -1349,8 +1350,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
var scroll_holder = 0;
|
||||||
|
var is_use_scroll_holder = false;
|
||||||
$(document).on('input', '.edit_textarea', function(){
|
$(document).on('input', '.edit_textarea', function(){
|
||||||
|
scroll_holder = $("#chat").scrollTop();
|
||||||
$(this).height(0).height(this.scrollHeight);
|
$(this).height(0).height(this.scrollHeight);
|
||||||
|
is_use_scroll_holder = true;
|
||||||
|
});
|
||||||
|
$("#chat").on("scroll", function() {
|
||||||
|
if(is_use_scroll_holder){
|
||||||
|
$("#chat").scrollTop(scroll_holder);
|
||||||
|
is_use_scroll_holder = false;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
$(document).on('click', '.del_checkbox', function(){
|
$(document).on('click', '.del_checkbox', function(){
|
||||||
$('.del_checkbox').each(function(){
|
$('.del_checkbox').each(function(){
|
||||||
@@ -1911,12 +1923,16 @@
|
|||||||
amount_gen = koboldai_settings[koboldai_setting_names[preset_settings]].genamt;
|
amount_gen = koboldai_settings[koboldai_setting_names[preset_settings]].genamt;
|
||||||
rep_pen = koboldai_settings[koboldai_setting_names[preset_settings]].rep_pen;
|
rep_pen = koboldai_settings[koboldai_setting_names[preset_settings]].rep_pen;
|
||||||
rep_pen_size = koboldai_settings[koboldai_setting_names[preset_settings]].rep_pen_range;
|
rep_pen_size = koboldai_settings[koboldai_setting_names[preset_settings]].rep_pen_range;
|
||||||
|
max_context = koboldai_settings[koboldai_setting_names[preset_settings]].max_length;
|
||||||
$('#temp').val(temp);
|
$('#temp').val(temp);
|
||||||
$('#temp_counter').html(temp);
|
$('#temp_counter').html(temp);
|
||||||
|
|
||||||
$('#amount_gen').val(amount_gen);
|
$('#amount_gen').val(amount_gen);
|
||||||
$('#amount_gen_counter').html(amount_gen);
|
$('#amount_gen_counter').html(amount_gen);
|
||||||
|
|
||||||
|
$('#max_context').val(max_context);
|
||||||
|
$('#max_context_counter').html(max_context+" Tokens");
|
||||||
|
|
||||||
$('#rep_pen').val(rep_pen);
|
$('#rep_pen').val(rep_pen);
|
||||||
$('#rep_pen_counter').html(rep_pen);
|
$('#rep_pen_counter').html(rep_pen);
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
<p>The maximum amount of tokens that a AI will generate to respond. One word is approximately 3-4 tokens. The larger the parameter value, the longer the generation time takes.</p>
|
<p>The maximum amount of tokens that a AI will generate to respond. One word is approximately 3-4 tokens. The larger the parameter value, the longer the generation time takes.</p>
|
||||||
<h3>Context size</h3>
|
<h3>Context size</h3>
|
||||||
<p>How much will the AI remember. Context size also affects the speed of generation.<br><br>
|
<p>How much will the AI remember. Context size also affects the speed of generation.<br><br>
|
||||||
<u>Important</u>: The settings of Context size in TavernAI GUI override any other settings for KoboldAI(from KoboldAI GUI and from preset files)</p>
|
<u>Important</u>: The setting of Context Size in TavernAI GUI override setting for KoboldAI GUI</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
3
public/scripts/showdown.min.js
vendored
Normal file
3
public/scripts/showdown.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/scripts/showdown.min.js.map
Normal file
1
public/scripts/showdown.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -17,9 +17,36 @@ body {
|
|||||||
scrollbar-color: gray #191b31;
|
scrollbar-color: gray #191b31;
|
||||||
|
|
||||||
}
|
}
|
||||||
i {
|
.mes_text i {
|
||||||
color: grey !important;
|
color: grey !important;
|
||||||
}
|
}
|
||||||
|
.mes_textem {
|
||||||
|
color: grey !important;
|
||||||
|
}
|
||||||
|
.mes_text p {
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
.mes_text strong {
|
||||||
|
font-weight: bold;
|
||||||
|
color: grey !important;
|
||||||
|
}
|
||||||
|
.mes_text h2 {
|
||||||
|
font-weight: bold;
|
||||||
|
color: rgb(229, 224, 216);
|
||||||
|
}
|
||||||
|
.mes_text h1 {
|
||||||
|
font-weight: bold;
|
||||||
|
color: rgb(229, 224, 216);
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
background-color: #a8a8a8;
|
||||||
|
padding: 5px;
|
||||||
|
font-family: Consolas, monospace;
|
||||||
|
color: #333;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
#bg1{
|
#bg1{
|
||||||
background-image: linear-gradient(rgba(19,21,44,0.75), rgba(19,21,44,0.75)), url(backgrounds/tavern.png);
|
background-image: linear-gradient(rgba(19,21,44,0.75), rgba(19,21,44,0.75)), url(backgrounds/tavern.png);
|
||||||
background-size: auto 100%;
|
background-size: auto 100%;
|
||||||
|
11
server.js
11
server.js
@@ -52,7 +52,7 @@ app.post("/getlastversion", jsonParser, function(request, response_getlastversio
|
|||||||
|
|
||||||
const repo = 'TavernAI/TavernAI';
|
const repo = 'TavernAI/TavernAI';
|
||||||
|
|
||||||
https.request({
|
const req = https.request({
|
||||||
hostname: 'github.com',
|
hostname: 'github.com',
|
||||||
path: `/${repo}/releases/latest`,
|
path: `/${repo}/releases/latest`,
|
||||||
method: 'HEAD'
|
method: 'HEAD'
|
||||||
@@ -66,10 +66,17 @@ app.post("/getlastversion", jsonParser, function(request, response_getlastversio
|
|||||||
}else{
|
}else{
|
||||||
response_getlastversion.send({version: 'error'});
|
response_getlastversion.send({version: 'error'});
|
||||||
}
|
}
|
||||||
}).end();
|
});
|
||||||
|
|
||||||
|
req.on('error', (error) => {
|
||||||
|
console.error(error);
|
||||||
|
response_getlastversion.send({version: 'error'});
|
||||||
|
});
|
||||||
|
|
||||||
|
req.end();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use(express.static(__dirname + "/public", { refresh: true }));
|
app.use(express.static(__dirname + "/public", { refresh: true }));
|
||||||
app.use('/backgrounds', (req, res) => {
|
app.use('/backgrounds', (req, res) => {
|
||||||
const filePath = path.join(process.cwd(), 'public/backgrounds', req.url);
|
const filePath = path.join(process.cwd(), 'public/backgrounds', req.url);
|
||||||
|
Reference in New Issue
Block a user