mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Many NovelAI fixes from dev guidance
* Remove AI Module "Autoselect" and make the auto-instruct work for all modules. This is how NAI is supposed to work. * Log the response from the API. * Move the AI Module setting up to the top of the settings window since it isn't part of the preset. * Refactor phrase_rep_pen to use the actual API strings. * Clamp the maximum token length to 150 before we call the API. * Clamp the minimum token length in the UX from 1 to 150. * Fix bug where the preamble was not initialized on cold start. * Get rid of extra newline before dinkus. * Make always_force_name2 default true.
This commit is contained in:
@ -3334,8 +3334,9 @@ function parseTokenCounts(counts, thisPromptBits) {
|
||||
}
|
||||
|
||||
function addChatsPreamble(mesSendString) {
|
||||
const preamble = main_api === 'novel' ? nai_settings.preamble : "";
|
||||
return preamble + '\n' + mesSendString;
|
||||
return main_api === 'novel'
|
||||
? nai_settings.preamble + '\n' + mesSendString
|
||||
: mesSendString;
|
||||
}
|
||||
|
||||
function addChatsSeparator(mesSendString) {
|
||||
@ -3349,7 +3350,7 @@ function addChatsSeparator(mesSendString) {
|
||||
}
|
||||
|
||||
else if (main_api === 'novel') {
|
||||
mesSendString = '\n***\n' + mesSendString;
|
||||
mesSendString = '***\n' + mesSendString;
|
||||
}
|
||||
|
||||
// add non-pygma dingus
|
||||
@ -4609,6 +4610,12 @@ function changeMainAPI() {
|
||||
activeItem.amountGenElem.css("opacity", 1.0);
|
||||
}
|
||||
|
||||
if (selectedVal === "novel") {
|
||||
$("#ai_module_block_novel").css("display", "block");
|
||||
} else {
|
||||
$("#ai_module_block_novel").css("display", "none");
|
||||
}
|
||||
|
||||
// Hide common settings for OpenAI
|
||||
console.debug('value?', selectedVal);
|
||||
if (selectedVal == "openai") {
|
||||
|
Reference in New Issue
Block a user