mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Expose new post-processing as "Semi-strict"
This commit is contained in:
@ -3329,8 +3329,9 @@
|
||||
<h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4>
|
||||
<select id="custom_prompt_post_processing" class="text_pole" title="Applies additional processing to the prompt before sending it to the API." data-i18n="[title]Applies additional processing to the prompt before sending it to the API.">
|
||||
<option data-i18n="prompt_post_processing_none" value="">None</option>
|
||||
<option value="merge">Merge consecutive roles</option>
|
||||
<option value="strict">Strict (user first, alternating roles)</option>
|
||||
<option data-i18n="prompt_post_processing_merge" value="merge">Merge consecutive roles</option>
|
||||
<option data-i18n="prompt_post_processing_semi" value="semi">Semi-strict (alternating roles)</option>
|
||||
<option data-i18n="prompt_post_processing_strict" value="strict">Strict (user first, alternating roles)</option>
|
||||
</select>
|
||||
</form>
|
||||
<div id="01ai_form" data-source="01ai">
|
||||
|
@ -205,6 +205,7 @@ const custom_prompt_post_processing_types = {
|
||||
/** @deprecated Use MERGE instead. */
|
||||
CLAUDE: 'claude',
|
||||
MERGE: 'merge',
|
||||
SEMI: 'semi',
|
||||
STRICT: 'strict',
|
||||
};
|
||||
|
||||
|
@ -64,7 +64,9 @@ function postProcessPrompt(messages, type, names) {
|
||||
switch (type) {
|
||||
case 'merge':
|
||||
case 'claude':
|
||||
return mergeMessages(messages, names, false, true);
|
||||
return mergeMessages(messages, names, false, false);
|
||||
case 'semi':
|
||||
return mergeMessages(messages, names, true, false);
|
||||
case 'strict':
|
||||
return mergeMessages(messages, names, true, true);
|
||||
case 'deepseek':
|
||||
|
Reference in New Issue
Block a user