mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'main' of https://github.com/Cohee1207/SillyTavern into mark-favorite-filter-by-favorite
This commit is contained in:
@@ -115,6 +115,7 @@
|
|||||||
<option value="gpt-3.5-turbo">gpt-3.5-turbo</option>
|
<option value="gpt-3.5-turbo">gpt-3.5-turbo</option>
|
||||||
<option value="gpt-3.5-turbo-0301">gpt-3.5-turbo-0301</option>
|
<option value="gpt-3.5-turbo-0301">gpt-3.5-turbo-0301</option>
|
||||||
<option value="gpt-4">gpt-4</option>
|
<option value="gpt-4">gpt-4</option>
|
||||||
|
<option value="gpt-4-32k">gpt-4-32k</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -91,12 +91,6 @@ async function onSelectImage(e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
function patchSendForm() {
|
|
||||||
const columns = $('#send_form').css('grid-template-columns').split(' ');
|
|
||||||
columns[columns.length - 1] = `${parseInt(columns[columns.length - 1]) + 40}px`;
|
|
||||||
columns[1] = 'auto';
|
|
||||||
$('#send_form').css('grid-template-columns', columns.join(' '));
|
|
||||||
}
|
|
||||||
function addSendPictureButton() {
|
function addSendPictureButton() {
|
||||||
const sendButton = document.createElement('div');
|
const sendButton = document.createElement('div');
|
||||||
sendButton.id = 'send_picture';
|
sendButton.id = 'send_picture';
|
||||||
@@ -118,7 +112,6 @@ $(document).ready(function () {
|
|||||||
addPictureSendForm();
|
addPictureSendForm();
|
||||||
addSendPictureButton();
|
addSendPictureButton();
|
||||||
setImageIcon();
|
setImageIcon();
|
||||||
patchSendForm();
|
|
||||||
moduleWorker();
|
moduleWorker();
|
||||||
setInterval(moduleWorker, UPDATE_INTERVAL);
|
setInterval(moduleWorker, UPDATE_INTERVAL);
|
||||||
});
|
});
|
@@ -79,13 +79,6 @@ function addDiceScript() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function patchSendForm() {
|
|
||||||
const columns = $('#send_form').css('grid-template-columns').split(' ');
|
|
||||||
columns[columns.length - 1] = `${parseInt(columns[columns.length - 1]) + 40}px`;
|
|
||||||
columns[1] = 'auto';
|
|
||||||
$('#send_form').css('grid-template-columns', columns.join(' '));
|
|
||||||
}
|
|
||||||
|
|
||||||
async function moduleWorker() {
|
async function moduleWorker() {
|
||||||
const context = getContext();
|
const context = getContext();
|
||||||
|
|
||||||
@@ -97,7 +90,6 @@ async function moduleWorker() {
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
addDiceScript();
|
addDiceScript();
|
||||||
addDiceRollButton();
|
addDiceRollButton();
|
||||||
patchSendForm();
|
|
||||||
setDiceIcon();
|
setDiceIcon();
|
||||||
moduleWorker();
|
moduleWorker();
|
||||||
setInterval(moduleWorker, UPDATE_INTERVAL);
|
setInterval(moduleWorker, UPDATE_INTERVAL);
|
||||||
|
@@ -55,6 +55,7 @@ const default_impersonation_prompt = "[Write your next reply from the point of v
|
|||||||
|
|
||||||
const gpt3_max = 4095;
|
const gpt3_max = 4095;
|
||||||
const gpt4_max = 8191;
|
const gpt4_max = 8191;
|
||||||
|
const gpt4_32k_max = 32767;
|
||||||
|
|
||||||
const tokenCache = {};
|
const tokenCache = {};
|
||||||
|
|
||||||
@@ -772,6 +773,9 @@ $(document).ready(function () {
|
|||||||
if (value == 'gpt-4') {
|
if (value == 'gpt-4') {
|
||||||
$('#openai_max_context').attr('max', gpt4_max);
|
$('#openai_max_context').attr('max', gpt4_max);
|
||||||
}
|
}
|
||||||
|
else if (value == 'gpt-4-32k') {
|
||||||
|
$('#openai_max_context').attr('max', gpt4_32k_max);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$('#openai_max_context').attr('max', gpt3_max);
|
$('#openai_max_context').attr('max', gpt3_max);
|
||||||
oai_settings.openai_max_context = Math.max(oai_settings.openai_max_context, gpt3_max);
|
oai_settings.openai_max_context = Math.max(oai_settings.openai_max_context, gpt3_max);
|
||||||
|
@@ -279,9 +279,8 @@ code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#send_form {
|
#send_form {
|
||||||
display: grid;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
grid-template-columns: 40px auto 40px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto 0 auto;
|
margin: 0 auto 0 auto;
|
||||||
border: 1px solid var(--grey30a);
|
border: 1px solid var(--grey30a);
|
||||||
@@ -644,6 +643,7 @@ select {
|
|||||||
font-family: "Noto Sans", "Noto Color Emoji", sans-serif;
|
font-family: "Noto Sans", "Noto Color Emoji", sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-shadow: #000 0 0 3px;
|
text-shadow: #000 0 0 3px;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#send_textarea::placeholder,
|
#send_textarea::placeholder,
|
||||||
|
Reference in New Issue
Block a user