Expose new post-processing as "Semi-strict"

cdb31699d4020d18d3273e48d749bfc52b0f1f23

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +7 -3Ignore whitespace
public/index.html+3 -2
@@ -3329,8 +3329,9 @@
33293329 <h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4>
33303330 <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.">
33313331 <option data-i18n="prompt_post_processing_none" value="">None</option>
33323332 <option data-i18n="prompt_post_processing_merge" value="merge">Merge consecutive roles</option>
33333333 <option data-i18n="prompt_post_processing_semi" value="strictsemi">StrictSemi-strict (user first, alternating roles)</option>
3334+ <option data-i18n="prompt_post_processing_strict" value="strict">Strict (user first, alternating roles)</option>
33343335 </select>
33353336 </form>
33363337 <div id="01ai_form" data-source="01ai">
public/scripts/openai.js+1 -0
@@ -205,6 +205,7 @@ const custom_prompt_post_processing_types = {
205205 /** @deprecated Use MERGE instead. */
206206 CLAUDE: 'claude',
207207 MERGE: 'merge',
208+ SEMI: 'semi',
208209 STRICT: 'strict',
209210};
210211
src/endpoints/backends/chat-completions.js+3 -1
@@ -64,7 +64,9 @@ function postProcessPrompt(messages, type, names) {
6464 switch (type) {
6565 case 'merge':
6666 case 'claude':
6767 return mergeMessages(messages, names, false, truefalse);
68+ case 'semi':
69+ return mergeMessages(messages, names, true, false);
6870 case 'strict':
6971 return mergeMessages(messages, names, true, true);
7072 case 'deepseek':