Merge branch 'staging' into swipe-nums-for-all-mes
This commit is contained in:
commit
d3120afc60
|
@ -1709,9 +1709,9 @@
|
|||
<div class="">
|
||||
<div class="inline-drawer wide100p flexFlowColumn">
|
||||
<div class="inline-drawer-toggle inline-drawer-header">
|
||||
<div class="flex-container alignItemsCenter flexNoGap">
|
||||
<div class="flex-container alignItemsCenter">
|
||||
<b data-i18n="Character Names Behavior">Character Names Behavior</b>
|
||||
<span title="Helps the model to associate messages with characters." data-i18n="[title]Helps the model to associate messages with characters." class="note-link-span fa-solid fa-circle-question"></span>
|
||||
<span title="Helps the model to associate messages with characters." data-i18n="[title]Helps the model to associate messages with characters." class="opacity50p fa-solid fa-circle-info"></span>
|
||||
<small class="flexBasis100p">(<span id="character_names_display"></span>)</small>
|
||||
</div>
|
||||
<div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
|
||||
|
@ -1720,25 +1720,22 @@
|
|||
<label class="checkbox_label flexWrap alignItemsCenter" for="character_names_none">
|
||||
<input type="radio" id="character_names_none" name="character_names" value="-1">
|
||||
<span data-i18n="None">None</span>
|
||||
<i class="right_menu_button fa-solid fa-circle-exclamation" title="Never add character name prefixes. May behave poorly in groups, choose with caution." data-i18n="[title]character_names_none"></i>
|
||||
<small class="flexBasis100p" data-i18n="Never add character names.">
|
||||
Never add character names.
|
||||
<small class="flexBasis100p" data-i18n="character_names_none">
|
||||
Never add character name prefixes. May behave poorly in groups, choose with caution.
|
||||
</small>
|
||||
</label>
|
||||
<label class="checkbox_label flexWrap alignItemsCenter" for="character_names_default">
|
||||
<input type="radio" id="character_names_default" name="character_names" value="0">
|
||||
<span data-i18n="Default">Default</span>
|
||||
<i class="right_menu_button fa-solid fa-circle-exclamation" title="Add prefixes for groups and past personas. Otherwise, make sure you provide names in the prompt." data-i18n="[title]character_names_default"></i>
|
||||
<small class="flexBasis100p" data-i18n="Don't add character names unless necessary.">
|
||||
Don't add character names unless necessary.
|
||||
<small class="flexBasis100p" data-i18n="character_names_default">
|
||||
Add prefixes for groups and past personas. Otherwise, make sure you provide names in the prompt.
|
||||
</small>
|
||||
</label>
|
||||
<label class="checkbox_label flexWrap alignItemsCenter" for="character_names_completion">
|
||||
<input type="radio" id="character_names_completion" name="character_names" value="1">
|
||||
<span data-i18n="Completion Object">Completion Object</span>
|
||||
<i class="right_menu_button fa-solid fa-circle-exclamation" title="Restrictions apply: only Latin alphanumerics and underscores. Doesn't work for all sources, notably: Claude, MistralAI, Google." data-i18n="[title]character_names_completion"></i>
|
||||
<small class="flexBasis100p" data-i18n="Add character names to completion objects.">
|
||||
Add character names to completion objects.
|
||||
<small class="flexBasis100p" data-i18n="character_names_completion">
|
||||
Add character names to completion objects. Restrictions apply: only Latin alphanumerics and underscores.
|
||||
</small>
|
||||
</label>
|
||||
<label class="checkbox_label flexWrap alignItemsCenter" for="character_names_content">
|
||||
|
@ -1754,9 +1751,9 @@
|
|||
</div>
|
||||
<div class="inline-drawer wide100p flexFlowColumn marginBot10">
|
||||
<div class="inline-drawer-toggle inline-drawer-header">
|
||||
<div class="flex-container alignItemsCenter flexNoGap">
|
||||
<div class="flex-container alignItemsCenter">
|
||||
<b data-i18n="Continue Postfix">Continue Postfix</b>
|
||||
<span data-i18n="[title]The next chunk of the continued message will be appended using this as a separator." title="The next chunk of the continued message will be appended using this as a separator." class="note-link-span fa-solid fa-circle-question"></span>
|
||||
<span data-i18n="[title]The next chunk of the continued message will be appended using this as a separator." title="The next chunk of the continued message will be appended using this as a separator." class="opacity50p fa-solid fa-circle-info"></span>
|
||||
<small class="flexBasis100p">(<span id="continue_postfix_display"></span>)</small>
|
||||
</div>
|
||||
<div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
|
||||
|
|
|
@ -724,6 +724,12 @@ async function populateChatHistory(messages, prompts, chatCompletion, type = nul
|
|||
|
||||
if (chatCompletion.canAfford(chatMessage)) {
|
||||
if (type === 'continue' && oai_settings.continue_prefill && chatPrompt === firstNonInjected) {
|
||||
// in case we are using continue_prefill and the latest message is an assistant message, we want to prepend the users assistant prefill on the message
|
||||
if (chatPrompt.role === 'assistant') {
|
||||
const collection = new MessageCollection('continuePrefill', new Message(chatMessage.role, substituteParams(oai_settings.assistant_prefill + '\n\n') + chatMessage.content, chatMessage.identifier));
|
||||
chatCompletion.add(collection, -1);
|
||||
continue;
|
||||
}
|
||||
const collection = new MessageCollection('continuePrefill', chatMessage);
|
||||
chatCompletion.add(collection, -1);
|
||||
continue;
|
||||
|
@ -1770,8 +1776,8 @@ async function sendOpenAIRequest(type, messages, signal) {
|
|||
generate_data['claude_use_sysprompt'] = oai_settings.claude_use_sysprompt;
|
||||
generate_data['stop'] = getCustomStoppingStrings(); // Claude shouldn't have limits on stop strings.
|
||||
generate_data['human_sysprompt_message'] = substituteParams(oai_settings.human_sysprompt_message);
|
||||
// Don't add a prefill on quiet gens (summarization)
|
||||
if (!isQuiet) {
|
||||
// Don't add a prefill on quiet gens (summarization) and when using continue prefill.
|
||||
if (!isQuiet && !(isContinue && oai_settings.continue_prefill)) {
|
||||
generate_data['assistant_prefill'] = isImpersonate ? substituteParams(oai_settings.assistant_impersonation) : substituteParams(oai_settings.assistant_prefill);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue