mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'dev' of https://github.com/SillyLossy/TavernAI into dev
This commit is contained in:
@ -107,16 +107,6 @@
|
|||||||
<div id="online_status_text2">Not connected</div>
|
<div id="online_status_text2">Not connected</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div id="kobold_api-presets">
|
|
||||||
<h3>Kobold Presets
|
|
||||||
<a href="/notes/4" class="notes-link" target="_blank">
|
|
||||||
<span class="note-link-span">?</span>
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
<select id="settings_perset">
|
|
||||||
<option value="gui">GUI KoboldAI Settings</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="novel_api" style="display: none;position: relative;"> <!-- shows the novel settings -->
|
<div id="novel_api" style="display: none;position: relative;"> <!-- shows the novel settings -->
|
||||||
<form action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
<form action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
||||||
@ -144,15 +134,7 @@
|
|||||||
<option value="euterpe-v2">Euterpe</option>
|
<option value="euterpe-v2">Euterpe</option>
|
||||||
<option value="krake-v2">Krake</option>
|
<option value="krake-v2">Krake</option>
|
||||||
</select>
|
</select>
|
||||||
<h4>
|
|
||||||
Preset settings
|
|
||||||
<a href="/notes/7" class="notes-link" target="_blank">
|
|
||||||
<span class="note-link-span">?</span>
|
|
||||||
</a>
|
|
||||||
</h4>
|
|
||||||
<select id="settings_perset_novel" class="option_select_right_menu">
|
|
||||||
<option value="gui">Default</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="textgenerationwebui_api" style="display: none;position: relative;">
|
<div id="textgenerationwebui_api" style="display: none;position: relative;">
|
||||||
<div class="oobabooga_logo">
|
<div class="oobabooga_logo">
|
||||||
@ -240,21 +222,13 @@
|
|||||||
<div id="power-user-options-block">
|
<div id="power-user-options-block">
|
||||||
<h3>Power User Options</h3>
|
<h3>Power User Options</h3>
|
||||||
<div id="power-user-option-checkboxes">
|
<div id="power-user-option-checkboxes">
|
||||||
<label class="checkbox_label" for="pin-examples-checkbox"><input id="pin-examples-checkbox" type="checkbox" />
|
|
||||||
Pin message examples
|
|
||||||
</label>
|
|
||||||
<label for="auto-connect-checkbox"><input id="auto-connect-checkbox" type="checkbox" />
|
<label for="auto-connect-checkbox"><input id="auto-connect-checkbox" type="checkbox" />
|
||||||
Auto-connect to Last Server
|
Auto-connect to Last Server
|
||||||
</label>
|
</label>
|
||||||
<label for="auto-load-chat-checkbox"><input id="auto-load-chat-checkbox" type="checkbox" />
|
<label for="auto-load-chat-checkbox"><input id="auto-load-chat-checkbox" type="checkbox" />
|
||||||
Auto-load Last Chat
|
Auto-load Last Chat
|
||||||
</label>
|
</label>
|
||||||
<label for="collapse-newlines-checkbox"><input id="collapse-newlines-checkbox" type="checkbox" />
|
|
||||||
Collapse Newlines in Output
|
|
||||||
</label>
|
|
||||||
<label for="force-pygmalion-formatting-checkbox"><input id="force-pygmalion-formatting-checkbox" type="checkbox" />
|
|
||||||
Pygmalion Formatting for All Models
|
|
||||||
</label>
|
|
||||||
<label for="swipes-checkbox"><input id="swipes-checkbox" type="checkbox" />
|
<label for="swipes-checkbox"><input id="swipes-checkbox" type="checkbox" />
|
||||||
Swipes
|
Swipes
|
||||||
</label>
|
</label>
|
||||||
@ -270,6 +244,31 @@
|
|||||||
<div class="drawer-content closedDrawer widthFreeExpand">
|
<div class="drawer-content closedDrawer widthFreeExpand">
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<div id="ai-settings-flex-col1" class="flexWide50p">
|
<div id="ai-settings-flex-col1" class="flexWide50p">
|
||||||
|
<div id="respective-presets-block">
|
||||||
|
<div id="kobold_api-presets">
|
||||||
|
<h3>Kobold Presets
|
||||||
|
<a href="/notes/4" class="notes-link" target="_blank">
|
||||||
|
<span class="note-link-span">?</span>
|
||||||
|
</a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<select id="settings_perset">
|
||||||
|
<option value="gui">GUI KoboldAI Settings</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div id="novel_api-presets">
|
||||||
|
<h4>
|
||||||
|
NovelAI Presets
|
||||||
|
<a href="/notes/7" class="notes-link" target="_blank">
|
||||||
|
<span class="note-link-span">?</span>
|
||||||
|
</a>
|
||||||
|
</h4>
|
||||||
|
<select id="settings_perset_novel" class="option_select_right_menu">
|
||||||
|
<option value="gui">Default</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
<div id="common-gen-settings-block">
|
<div id="common-gen-settings-block">
|
||||||
<div id="pro-settings-block">
|
<div id="pro-settings-block">
|
||||||
<div id="amount_gen_block" class="range-block">
|
<div id="amount_gen_block" class="range-block">
|
||||||
@ -447,25 +446,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="anchors-block">
|
|
||||||
Anchors Order
|
|
||||||
<a href="/notes/9" class="notes-link" target="_blank">
|
|
||||||
<span class="note-link-span">?</span>
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
<select id="anchor_order">
|
|
||||||
<option value="0">Character then Style</option>
|
|
||||||
<option value="1">Style then Character</option>
|
|
||||||
</select>
|
|
||||||
<div id="anchor_checkbox">
|
|
||||||
<label for="character_anchor"><input id="character_anchor" type="checkbox" />
|
|
||||||
Character Anchor
|
|
||||||
</label>
|
|
||||||
<label for="style_anchor"><input id="style_anchor" type="checkbox" />
|
|
||||||
Style Anchor
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="ai-settings-flex-col2" class="flexWide50p">
|
<div id="ai-settings-flex-col2" class="flexWide50p">
|
||||||
<div id="advanced-ai-config-block">
|
<div id="advanced-ai-config-block">
|
||||||
@ -744,10 +725,40 @@
|
|||||||
<input id="disable-personality-formatting-checkbox" type="checkbox" />
|
<input id="disable-personality-formatting-checkbox" type="checkbox" />
|
||||||
Disable personality formatting
|
Disable personality formatting
|
||||||
</label>
|
</label>
|
||||||
|
<hr>
|
||||||
<label class="checkbox_label" for="always-force-name2-checkbox">
|
<label class="checkbox_label" for="always-force-name2-checkbox">
|
||||||
<input id="always-force-name2-checkbox" type="checkbox" />
|
<input id="always-force-name2-checkbox" type="checkbox" />
|
||||||
Always add character's name to prompt
|
Always add character's name to prompt
|
||||||
</label>
|
</label>
|
||||||
|
<label class="checkbox_label" for="force-pygmalion-formatting-checkbox"><input id="force-pygmalion-formatting-checkbox" type="checkbox" />
|
||||||
|
Pygmalion Formatting for All Models
|
||||||
|
</label>
|
||||||
|
<label class="checkbox_label" for="pin-examples-checkbox"><input id="pin-examples-checkbox" type="checkbox" />
|
||||||
|
Keep Example Messages in Prompt
|
||||||
|
</label>
|
||||||
|
<label class="checkbox_label" for="collapse-newlines-checkbox"><input id="collapse-newlines-checkbox" type="checkbox" />
|
||||||
|
Remove Empty New Lines from Output
|
||||||
|
</label>
|
||||||
|
<hr>
|
||||||
|
<div id="anchors-block">
|
||||||
|
Anchors Order
|
||||||
|
<a href="/notes/9" class="notes-link" target="_blank">
|
||||||
|
<span class="note-link-span">?</span>
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<select id="anchor_order">
|
||||||
|
<option value="0">Character then Style</option>
|
||||||
|
<option value="1">Style then Character</option>
|
||||||
|
</select>
|
||||||
|
<div id="anchor_checkbox">
|
||||||
|
<label for="character_anchor"><input id="character_anchor" type="checkbox" />
|
||||||
|
Character Anchor
|
||||||
|
</label>
|
||||||
|
<label for="style_anchor"><input id="style_anchor" type="checkbox" />
|
||||||
|
Style Anchor
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -724,6 +724,7 @@ function appendImageToMessage(mes, messageElement) {
|
|||||||
if (mes.extra?.image) {
|
if (mes.extra?.image) {
|
||||||
const image = document.createElement("img");
|
const image = document.createElement("img");
|
||||||
image.src = mes.extra?.image;
|
image.src = mes.extra?.image;
|
||||||
|
image.title = mes.title;
|
||||||
image.classList.add("img_extra");
|
image.classList.add("img_extra");
|
||||||
messageElement.find(".mes_text").prepend(image);
|
messageElement.find(".mes_text").prepend(image);
|
||||||
}
|
}
|
||||||
@ -1818,6 +1819,7 @@ function changeMainAPI() {
|
|||||||
"kobold": {
|
"kobold": {
|
||||||
apiSettings: $("#kobold_api-settings"),
|
apiSettings: $("#kobold_api-settings"),
|
||||||
apiConnector: $("#kobold_api"),
|
apiConnector: $("#kobold_api"),
|
||||||
|
apiPresets: $('#kobold_api-presets'),
|
||||||
apiRanges: $("#range_block"),
|
apiRanges: $("#range_block"),
|
||||||
maxContextElem: $("#max_context_block"),
|
maxContextElem: $("#max_context_block"),
|
||||||
amountGenElem: $("#amount_gen_block"),
|
amountGenElem: $("#amount_gen_block"),
|
||||||
@ -1826,6 +1828,7 @@ function changeMainAPI() {
|
|||||||
"textgenerationwebui": {
|
"textgenerationwebui": {
|
||||||
apiSettings: $("#textgenerationwebui_api-settings"),
|
apiSettings: $("#textgenerationwebui_api-settings"),
|
||||||
apiConnector: $("#textgenerationwebui_api"),
|
apiConnector: $("#textgenerationwebui_api"),
|
||||||
|
apiPresets: $('#textgenerationwebui_api-presets'),
|
||||||
apiRanges: $("#range_block_textgenerationwebui"),
|
apiRanges: $("#range_block_textgenerationwebui"),
|
||||||
maxContextElem: $("#max_context_block"),
|
maxContextElem: $("#max_context_block"),
|
||||||
amountGenElem: $("#amount_gen_block"),
|
amountGenElem: $("#amount_gen_block"),
|
||||||
@ -1834,6 +1837,7 @@ function changeMainAPI() {
|
|||||||
"novel": {
|
"novel": {
|
||||||
apiSettings: $("#novel_api-settings"),
|
apiSettings: $("#novel_api-settings"),
|
||||||
apiConnector: $("#novel_api"),
|
apiConnector: $("#novel_api"),
|
||||||
|
apiPresets: $('#novel_api-presets'),
|
||||||
apiRanges: $("#range_block_novel"),
|
apiRanges: $("#range_block_novel"),
|
||||||
maxContextElem: $("#max_context_block"),
|
maxContextElem: $("#max_context_block"),
|
||||||
amountGenElem: $("#amount_gen_block"),
|
amountGenElem: $("#amount_gen_block"),
|
||||||
@ -1842,6 +1846,7 @@ function changeMainAPI() {
|
|||||||
"openai": {
|
"openai": {
|
||||||
apiSettings: $("#openai_settings"),
|
apiSettings: $("#openai_settings"),
|
||||||
apiConnector: $("#openai_api"),
|
apiConnector: $("#openai_api"),
|
||||||
|
apiPresets: $('#openai_api-presets'),
|
||||||
apiRanges: $("#range_block_openai"),
|
apiRanges: $("#range_block_openai"),
|
||||||
maxContextElem: $("#max_context_block"),
|
maxContextElem: $("#max_context_block"),
|
||||||
amountGenElem: $("#amount_gen_block"),
|
amountGenElem: $("#amount_gen_block"),
|
||||||
@ -1858,6 +1863,7 @@ function changeMainAPI() {
|
|||||||
apiObj.apiSettings.css("display", isCurrentApi ? "block" : "none");
|
apiObj.apiSettings.css("display", isCurrentApi ? "block" : "none");
|
||||||
apiObj.apiConnector.css("display", isCurrentApi ? "block" : "none");
|
apiObj.apiConnector.css("display", isCurrentApi ? "block" : "none");
|
||||||
apiObj.apiRanges.css("display", isCurrentApi ? "block" : "none");
|
apiObj.apiRanges.css("display", isCurrentApi ? "block" : "none");
|
||||||
|
apiObj.apiPresets.css("display", isCurrentApi ? "block" : "none");
|
||||||
|
|
||||||
if (isCurrentApi && apiName === "kobold") {
|
if (isCurrentApi && apiName === "kobold") {
|
||||||
console.log("enabling SP for kobold");
|
console.log("enabling SP for kobold");
|
||||||
|
@ -45,6 +45,7 @@ async function sendCaptionedMessage(caption, image) {
|
|||||||
send_date: Date.now(),
|
send_date: Date.now(),
|
||||||
mes: messageText,
|
mes: messageText,
|
||||||
extra: { image: image },
|
extra: { image: image },
|
||||||
|
title: caption
|
||||||
};
|
};
|
||||||
context.chat.push(message);
|
context.chat.push(message);
|
||||||
context.addOneMessage(message);
|
context.addOneMessage(message);
|
||||||
|
Reference in New Issue
Block a user