diff --git a/public/NovelAI Settings/Classic-Euterpe.settings b/public/NovelAI Settings/Classic-Euterpe.settings
new file mode 100644
index 000000000..dcfc70285
--- /dev/null
+++ b/public/NovelAI Settings/Classic-Euterpe.settings
@@ -0,0 +1,14 @@
+{
+ "order": [
+ 3,
+ 0
+ ],
+ "temperature": 1.11,
+ "max_length": 90,
+ "min_length": 1,
+ "tail_free_sampling": 0.68,
+ "repetition_penalty": 1.11,
+ "repetition_penalty_range": 320,
+ "repetition_penalty_frequency": 0,
+ "repetition_penalty_presence": 0
+}
\ No newline at end of file
diff --git a/public/NovelAI Settings/Classic-Krake.settings b/public/NovelAI Settings/Classic-Krake.settings
new file mode 100644
index 000000000..8d9025b40
--- /dev/null
+++ b/public/NovelAI Settings/Classic-Krake.settings
@@ -0,0 +1,14 @@
+{
+ "order": [
+ 3,
+ 0
+ ],
+ "temperature": 1.7,
+ "max_length": 90,
+ "min_length": 1,
+ "tail_free_sampling": 0.6602,
+ "repetition_penalty": 1.0565,
+ "repetition_penalty_range": 340,
+ "repetition_penalty_frequency": 0,
+ "repetition_penalty_presence": 0
+}
\ No newline at end of file
diff --git a/public/backgrounds/flasks.png b/public/backgrounds/flasks.png
new file mode 100644
index 000000000..eba94a3dc
Binary files /dev/null and b/public/backgrounds/flasks.png differ
diff --git a/public/backgrounds/kingdom.png b/public/backgrounds/kingdom.png
new file mode 100644
index 000000000..70515e214
Binary files /dev/null and b/public/backgrounds/kingdom.png differ
diff --git a/public/backgrounds/market1.png b/public/backgrounds/market.png
similarity index 100%
rename from public/backgrounds/market1.png
rename to public/backgrounds/market.png
diff --git a/public/backgrounds/noble1.png b/public/backgrounds/noble1.png
new file mode 100644
index 000000000..72cba2673
Binary files /dev/null and b/public/backgrounds/noble1.png differ
diff --git a/public/backgrounds/noble2.png b/public/backgrounds/noble2.png
new file mode 100644
index 000000000..45e606285
Binary files /dev/null and b/public/backgrounds/noble2.png differ
diff --git a/public/backgrounds/ruins.png b/public/backgrounds/ruins.png
new file mode 100644
index 000000000..3d469a1b7
Binary files /dev/null and b/public/backgrounds/ruins.png differ
diff --git a/public/backgrounds/smokycity.png b/public/backgrounds/smokycity.png
new file mode 100644
index 000000000..64913c304
Binary files /dev/null and b/public/backgrounds/smokycity.png differ
diff --git a/public/backgrounds/warmtown.png b/public/backgrounds/warmtown.png
new file mode 100644
index 000000000..8c7d88e61
Binary files /dev/null and b/public/backgrounds/warmtown.png differ
diff --git a/public/backgrounds/whitesnow.png b/public/backgrounds/whitesnow.png
new file mode 100644
index 000000000..9c9fe8d62
Binary files /dev/null and b/public/backgrounds/whitesnow.png differ
diff --git a/public/img/cancel.png b/public/img/cancel.png
new file mode 100644
index 000000000..26b29623c
Binary files /dev/null and b/public/img/cancel.png differ
diff --git a/public/img/done.png b/public/img/done.png
new file mode 100644
index 000000000..e119b4aa7
Binary files /dev/null and b/public/img/done.png differ
diff --git a/public/img/kobold.png b/public/img/kobold.png
new file mode 100644
index 000000000..914871155
Binary files /dev/null and b/public/img/kobold.png differ
diff --git a/public/img/love.png b/public/img/love.png
new file mode 100644
index 000000000..729456657
Binary files /dev/null and b/public/img/love.png differ
diff --git a/public/img/novelai.png b/public/img/novelai.png
new file mode 100644
index 000000000..2eb1b636a
Binary files /dev/null and b/public/img/novelai.png differ
diff --git a/public/img/scroll.png b/public/img/scroll.png
new file mode 100644
index 000000000..22e3513e8
Binary files /dev/null and b/public/img/scroll.png differ
diff --git a/public/index.html b/public/index.html
index 5d21cf9e6..28f427d36 100644
--- a/public/index.html
+++ b/public/index.html
@@ -13,13 +13,13 @@
//2) Count tokens print fix
//3) Make wildcards for characters
//4) Fix same callback in server.js create/edit
- //5) Edit messages
+
//6) Reload setting files when they was rewrite
//7) Show an indicator that shows the message in context or not
//8) Сombine multiple messages into one if the text continues
//9) Access for many chats
//10) Design presets
- //11) Fix sended propt with json markup
+ //11) Fix sending propt with json additional symbols (kinda \\ and etc)
//
//import {encode, decode} from "../scripts/gpt-2-3-tokenizer/mod.js";
//let text = "hello world";
@@ -29,9 +29,10 @@
import {encode, decode} from "../scripts/gpt-2-3-tokenizer/mod.js";
$(document).ready(function(){
var bg_menu_toggle = false;
- var name1 = "You";
+ var default_user_name = "You";
+ var name1 = default_user_name;
var name2 = "Chloe";
- var chat = ['\nChloe: *You went inside. The air smelled of fried meat, tobacco and a hint of wine. A dim light was cast by candles, and a fire crackled in the fireplace. It seems to be a very pleasant place. Behind the wooden bar is an elf waitress, she is smiling. Her ears are very pointy, and there is a twinkle in her eye. She wears glasses and a white aporn. As soon as she noticed you, she immediately came right up close to you.*\n\n Hello there! How is your evening going?\n\n@@@TavernAI v1.0.0@@@
Give a Tip
'];
+ var chat = ['\nChloe: *You went inside. The air smelled of fried meat, tobacco and a hint of wine. A dim light was cast by candles, and a fire crackled in the fireplace. It seems to be a very pleasant place. Behind the wooden bar is an elf waitress, she is smiling. Her ears are very pointy, and there is a twinkle in her eye. She wears glasses and a white aporn. As soon as she noticed you, she immediately came right up close to you.*\n\n Hello there! How is your evening going?\n\n@@@TavernAI v1.1.0@@@
Give a Tip
'];
var default_ch_mes = "Hello";
var count_view_mes = 0;
var mesStr = '';
@@ -61,14 +62,21 @@
var api_server = "";
var interval_timer = setInterval(getStatus, 2000);
+ var interval_timer_novel = setInterval(getStatusNovel, 3000);
var is_get_status = false;
+ var is_get_status_novel = false;
var is_api_button_press = false;
+ var is_api_button_press_novel = false;
var is_send_press = false;//Send generation
var add_mes_without_animation = false;
var this_del_mes = 0;
+ var this_edit_mes_text = '';
+ var this_edit_mes_chname = '';
+ var this_edit_mes_id;
+
const delay = ms => new Promise(res => setTimeout(res, ms));
//settings
var settings;
@@ -79,14 +87,33 @@
var temp = 0.5;
var amount_gen = 80;
var max_context = 2048;//2048;
-
- var postAnchor = '';
+ var rep_pen = 1;
+ var rep_pen_size = 100;
+
+ var anchor_order = 0;
+ var style_anchor = true;
+ var character_anchor = true;
+
+ var main_api = 'kobold';
+ //novel settings
+ var temp_novel = 0.5;
+ var rep_pen_novel = 1;
+ var rep_pen_size_novel = 100;
+
+ var api_key_novel = "";
+ var novel_tier;
+ var model_novel = "euterpe-v2";
+ var novelai_settings;
+ var novelai_setting_names;
+ var preset_settings_novel = 'Classic-Krake';
+
//css
var bg1_toggle = true;
var css_mes_bg = $('').css('background');
var css_send_form_display = $('').css('display');
/////////////
- getSettings();
+ getSettings("def");
+ //var interval_getSettings = setInterval(getSettings, 1000);
getCharacters();
printMessages();
@@ -101,13 +128,18 @@
$("#online_status_text").html("No connection...");
$("#online_status_indicator2").css("background-color", "red");
$("#online_status_text2").html("No connection...");
+ $("#online_status_indicator3").css("background-color", "red");
+ $("#online_status_text3").html("No connection...");
is_get_status = false;
+ is_get_status_novel = false;
}else{
$("#online_status_indicator").css("background-color", "black");
$("#online_status").css("opacity", 0.0);
$("#online_status_text").html("");
$("#online_status_indicator2").css("background-color", "green");
$("#online_status_text2").html(online_status);
+ $("#online_status_indicator3").css("background-color", "green");
+ $("#online_status_text3").html(online_status);
}
}
@@ -133,7 +165,10 @@
//processData: false,
success: function(data){
online_status = data.result;
-
+ if(online_status == undefined){
+ online_status = 'no_connection';
+ }
+ //console.log(online_status);
resultCheckStatus();
},
@@ -145,8 +180,13 @@
resultCheckStatus();
}
});
+ }else{
+ if(is_get_status_novel != true){
+ online_status = 'no_connection';
+ }
}
}
+
function resultCheckStatus(){
is_api_button_press = false;
checkOnlineStatus();
@@ -199,6 +239,7 @@
}
}
async function getBackgrounds() {
+
const response = await fetch("/getbackgrounds", {
method: "POST",
headers: { "Content-Type": "application/json" },
@@ -291,6 +332,13 @@
count_view_mes = 0;
$('#chat').html('');
}
+ function messageFormating(mes, ch_name){
+ mes = mes.replace(/\*\*(.+?)\*\*/g, '$1').replace(/\*(.+?)\*/g, '$1').replace(/\n/g, ' ');
+ if(ch_name !== name1){
+ mes = mes.replaceAll(name2+":", "");
+ }
+ return mes;
+ }
function addOneMessage(message){
message = message.replace(/^\s+/g, '');
//console.log(message.indexOf(name1+":"));
@@ -320,11 +368,13 @@
}
//Formating
- messageText = messageText.replace(/\*\*(.+?)\*\*/g, '$1').replace(/\*(.+?)\*/g, '$1').replace(/\n/g, ' ');
- if(characterName != name1){
- messageText = messageText.replaceAll(name2+":", "");
- }
- $("#chat").append( "
TavernAI is being developed with love and care on a voluntary basis. If you like the project and want to support it, your donation would make a huge impact! Thank you!