Chat Completion: Reduce number of toggles in AI Response Configuration (#4821) * Chat Completion: Reduce number of toggles in AI Response Configuration * Consolidate migration logic * Don't enable media inlining if image inlining was disabled * Fix icons showing on media toggle off * Update i18n
Signed| @@ -28,7 +28,6 @@ | ||
| 28 | 28 | "repetition_penalty": 1, |
| 29 | 29 | "openai_max_context": 4095, |
| 30 | 30 | "openai_max_tokens": 300, |
| 31 | - "wrap_in_quotes": false, | |
| 32 | 31 | "names_behavior": 0, |
| 33 | 32 | "send_if_empty": "", |
| 34 | 33 | "impersonation_prompt": "[Write your next reply from the point of view of {{user}}, using the chat history so far as a guideline for the writing style of {{user}}. Don't write as {{char}} or system. Don't describe actions of {{char}}.]", |
| @@ -231,9 +230,8 @@ | ||
| 231 | 230 | "show_external_models": false, |
| 232 | 231 | "assistant_prefill": "", |
| 233 | 232 | "assistant_impersonation": "", |
| 234 | 233 | "claude_use_syspromptuse_sysprompt": false, |
| 235 | 234 | "squash_system_messagesmedia_inlining": falsetrue, |
| 236 | - "image_inlining": false, | |
| 237 | 235 | "bypass_status_check": false, |
| 238 | 236 | "continue_prefill": false, |
| 239 | 237 | "continue_postfix": " ", |
| @@ -463,7 +463,6 @@ | ||
| 463 | 463 | "stream_openai": true, |
| 464 | 464 | "openai_max_context": 4095, |
| 465 | 465 | "openai_max_tokens": 300, |
| 466 | - "wrap_in_quotes": false, | |
| 467 | 466 | "prompts": [ |
| 468 | 467 | { |
| 469 | 468 | "name": "Main Prompt", |
| @@ -532,6 +532,7 @@ label[for="bind_preset_to_connection"]:has(input:checked) { | ||
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | #openai_settings input[type="checkbox"]:not(:checked)~[data-cc-toggle], |
| 535 | +#openai_settings input[type="checkbox"]:not(:checked)~*:has([data-cc-toggle]), | |
| 535 | 536 | #openai_settings [data-cc-toggle="false"]>.icon-supported, |
| 536 | 537 | #openai_settings [data-cc-toggle="true"]>.icon-unsupported { |
| 537 | 538 | display: none; |
| @@ -1920,18 +1920,6 @@ | ||
| 1920 | 1920 | </div> |
| 1921 | 1921 | </div> |
| 1922 | 1922 | <div class="range-block"> |
| 1923 | - <label for="wrap_in_quotes" title="Wrap user messages in quotes before sending" data-i18n="[title]Wrap user messages in quotes before sending" class="checkbox_label widthFreeExpand"> | |
| 1924 | - <input id="wrap_in_quotes" type="checkbox" /><span data-i18n="Wrap in Quotes"> | |
| 1925 | - Wrap in Quotes</span> | |
| 1926 | - </label> | |
| 1927 | - <div class="toggle-description justifyLeft"> | |
| 1928 | - <span data-i18n="Wrap entire user message in quotes before sending.">Wrap | |
| 1929 | - entire user message in quotes before sending.</span><br> | |
| 1930 | - <span data-i18n="Leave off if you use quotes manually for speech.">Leave off | |
| 1931 | - if you use quotes manually for speech.</span> | |
| 1932 | - </div> | |
| 1933 | - </div> | |
| 1934 | - <div class="range-block"> | |
| 1935 | 1923 | <label for="continue_prefill" class="checkbox_label widthFreeExpand"> |
| 1936 | 1924 | <input id="continue_prefill" type="checkbox" /> |
| 1937 | 1925 | <span data-i18n="Continue prefill">Continue prefill</span> |
| @@ -1942,16 +1930,16 @@ | ||
| 1942 | 1930 | </span> |
| 1943 | 1931 | </div> |
| 1944 | 1932 | </div> |
| 1945 | 1933 | <div class="range-block" data-source="claude,makersuite,vertexai"> |
| 1946 | 1934 | <label for="squash_system_messages" title="Squash system messages" data-i18n="[title]Squash system messagesuse_sysprompt" class="checkbox_label widthFreeExpand"> |
| 1947 | 1935 | <input id="squash_system_messagesuse_sysprompt" type="checkbox" /> |
| 1948 | - <span data-i18n="Squash system messages"> | |
| 1936 | + <span> | |
| 1949 | - Squash system messages | |
| 1937 | + <span data-i18n="Use system prompt">Use system prompt</span> | |
| 1950 | 1938 | </span> |
| 1951 | 1939 | </label> |
| 1952 | 1940 | <div class="toggle-description justifyLeft marginBot5"> |
| 1953 | 1941 | <span data-i18n="CombinesSend consecutivethe system messagesprompt intofor onesupported (excludingmodels. exampleIf dialogues).disabled, Maythe improveuser coherencemessage foris someadded modelsto the beginning of the prompt."> |
| 1954 | - Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models. | |
| 1942 | + Send the system prompt for supported models. If disabled, the user message is added to the beginning of the prompt. | |
| 1955 | 1943 | </span> |
| 1956 | 1944 | </div> |
| 1957 | 1945 | </div> |
| @@ -1985,16 +1973,28 @@ | ||
| 1985 | 1973 | </div> |
| 1986 | 1974 | </div> |
| 1987 | 1975 | <div class="range-block" data-source="openai,aimlapi,openrouter,mistralai,makersuite,vertexai,claude,custom,xai,pollinations,moonshot,cohere,cometapi,nanogpt,electronhub,azure_openai,zai,siliconflow"> |
| 1988 | 1976 | <label for="openai_image_inliningopenai_media_inlining" class="checkbox_label flexWrap widthFreeExpand"> |
| 1989 | 1977 | <input id="openai_image_inliningopenai_media_inlining" type="checkbox" /> |
| 1990 | 1978 | <span data-i18n="Send inline imagesmedia">Send inline imagesmedia</span> |
| 1991 | 1979 | <div idclass="openai_image_inlining_supported" data-ccflex-toggle="falsecontainer"> |
| 1992 | - <i class="icon-supported fa-solid fa-circle-check" title="Supported by the current model" data-i18n="[title]Supported by the current model"></i> | |
| 1980 | + <div id="openai_image_inlining_supported"> | |
| 1993 | 1981 | <i class="icon-unsupportedsupported fa-solid fa-circle-exclamationimage" title="UnsupportedSupported by the current model" data-i18n="[title]UnsupportedSupported by the current model"></i> |
| 1982 | + <i class="icon-unsupported fa-solid fa-image" title="Unsupported by the current model" data-i18n="[title]Unsupported by the current model"></i> | |
| 1983 | + </div> | |
| 1984 | + <div id="openai_video_inlining_supported" data-source="makersuite,vertexai,openrouter"> | |
| 1985 | + <i class="icon-supported fa-solid fa-film" title="Supported by the current model" data-i18n="[title]Supported by the current model"></i> | |
| 1986 | + <i class="icon-unsupported fa-solid fa-film" title="Unsupported by the current model" data-i18n="[title]Unsupported by the current model"></i> | |
| 1987 | + </div> | |
| 1988 | + <div id="openai_audio_inlining_supported" data-source="makersuite,vertexai,openrouter"> | |
| 1989 | + <i class="icon-supported fa-solid fa-music" title="Supported by the current model" data-i18n="[title]Supported by the current model"></i> | |
| 1990 | + <i class="icon-unsupported fa-solid fa-music" title="Unsupported by the current model" data-i18n="[title]Unsupported by the current model"></i> | |
| 1991 | + </div> | |
| 1994 | 1992 | </div> |
| 1995 | 1993 | </label> |
| 1996 | 1994 | <div id="image_inlining_hint" class="flexBasis100p toggle-description justifyLeft"> |
| 1997 | 1995 | <span data-i18n="image_inlining_hint_1">Sends imagesattached media in prompts if thesupported modelby supportsthe itmodel.</span> |
| 1996 | + <strong data-source="makersuite,vertexai" data-i18n="video_inlining_hint_4">Videos must be less than 20 MB and under 1 minute long.</strong> | |
| 1997 | + <strong data-source="makersuite,vertexai" data-i18n="audio_inlining_hint_2">Audio must be less than 20 MB.</strong> | |
| 1998 | 1998 | </div> |
| 1999 | 1999 | <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom,xai,pollinations,cohere,cometapi,nanogpt,moonshot,aimlapi,openrouter,mistralai,electronhub,azure_openai,zai,siliconflow"> |
| 2000 | 2000 | <div class="flex-container oneline-dropdown"> |
| @@ -2009,40 +2009,12 @@ | ||
| 2009 | 2009 | </div> |
| 2010 | 2010 | </div> |
| 2011 | 2011 | </div> |
| 2012 | - <div class="range-block" data-source="makersuite,vertexai,openrouter"> | |
| 2013 | - <label for="openai_video_inlining" class="checkbox_label flexWrap widthFreeExpand"> | |
| 2014 | - <input id="openai_video_inlining" type="checkbox" /> | |
| 2015 | - <span data-i18n="Send inline videos">Send inline videos</span> | |
| 2016 | - <div id="openai_video_inlining_supported" data-cc-toggle="false"> | |
| 2017 | - <i class="icon-supported fa-solid fa-circle-check" title="Supported by the current model" data-i18n="[title]Supported by the current model"></i> | |
| 2018 | - <i class="icon-unsupported fa-solid fa-circle-exclamation" title="Unsupported by the current model" data-i18n="[title]Unsupported by the current model"></i> | |
| 2019 | - </div> | |
| 2020 | - </label> | |
| 2021 | - <div id="video_inlining_hint" class="flexBasis100p toggle-description justifyLeft"> | |
| 2022 | - <span data-i18n="video_inlining_hint_1">Sends videos in prompts if the model supports it.</span> | |
| 2023 | - <strong data-source="makersuite,vertexai" data-i18n="video_inlining_hint_4">Videos must be less than 20 MB and under 1 minute long</strong> | |
| 2024 | - </div> | |
| 2025 | - </div> | |
| 2026 | - <div class="range-block" data-source="makersuite,vertexai,openrouter"> | |
| 2027 | - <label for="openai_audio_inlining" class="checkbox_label flexWrap widthFreeExpand"> | |
| 2028 | - <input id="openai_audio_inlining" type="checkbox" /> | |
| 2029 | - <span data-i18n="Send inline audio">Send inline audio</span> | |
| 2030 | - <div id="openai_audio_inlining_supported" data-cc-toggle="false"> | |
| 2031 | - <i class="icon-supported fa-solid fa-circle-check" title="Supported by the current model" data-i18n="[title]Supported by the current model"></i> | |
| 2032 | - <i class="icon-unsupported fa-solid fa-circle-exclamation" title="Unsupported by the current model" data-i18n="[title]Unsupported by the current model"></i> | |
| 2033 | - </div> | |
| 2034 | - </label> | |
| 2035 | - <div id="audio_inlining_hint" class="flexBasis100p toggle-description justifyLeft"> | |
| 2036 | - <span data-i18n="audio_inlining_hint_1">Sends audio in prompts if the model supports it.</span> | |
| 2037 | - <strong data-source="makersuite,vertexai" data-i18n="audio_inlining_hint_2">Audio must be less than 20 MB</strong> | |
| 2038 | - </div> | |
| 2039 | - </div> | |
| 2040 | 2012 | <div class="range-block" data-source="makersuite,vertexai"> |
| 2041 | 2013 | <label for="openai_request_images" class="checkbox_label widthFreeExpand"> |
| 2042 | 2014 | <input id="openai_request_images" type="checkbox" /> |
| 2043 | 2015 | <span> |
| 2044 | 2016 | <span data-i18n="Request inline images">Request inline images</span> |
| 2045 | 2017 | <i class="opacity50p fa-solid fa-circle-info" title="Gemini 2.05 Flash ExperimentalImage / Gemini 3 Pro Image"></i> |
| 2046 | 2018 | </span> |
| 2047 | 2019 | </label> |
| 2048 | 2020 | <div class="toggle-description justifyLeft marginBot5"> |
| @@ -2054,20 +2026,6 @@ | ||
| 2054 | 2026 | </em> |
| 2055 | 2027 | </div> |
| 2056 | 2028 | </div> |
| 2057 | - <div class="range-block" data-source="makersuite,vertexai"> | |
| 2058 | - <label for="use_makersuite_sysprompt" class="checkbox_label widthFreeExpand"> | |
| 2059 | - <input id="use_makersuite_sysprompt" type="checkbox" /> | |
| 2060 | - <span> | |
| 2061 | - <span data-i18n="Use system prompt">Use system prompt</span> | |
| 2062 | - <i class="opacity50p fa-solid fa-circle-info" title="Gemini 1.5+, LearnLM"></i> | |
| 2063 | - </span> | |
| 2064 | - </label> | |
| 2065 | - <div class="toggle-description justifyLeft marginBot5"> | |
| 2066 | - <span data-i18n="Merges_all_system_messages_desc_1"> | |
| 2067 | - Merges all system messages up until the first message with a non-system role, and sends them in a</span> <code>system_instruction</code> <span data-i18n="Merges_all_system_messages_desc_2">field. | |
| 2068 | - </span> | |
| 2069 | - </div> | |
| 2070 | - </div> | |
| 2071 | 2029 | <div class="range-block" data-source="deepseek,aimlapi,openrouter,custom,claude,xai,makersuite,vertexai,pollinations,moonshot,mistralai,fireworks,cometapi,electronhub,azure_openai,nanogpt,zai"> |
| 2072 | 2030 | <label for="openai_show_thoughts" class="checkbox_label widthFreeExpand"> |
| 2073 | 2031 | <input id="openai_show_thoughts" type="checkbox" /> |
| @@ -2124,15 +2082,6 @@ | ||
| 2124 | 2082 | <i class="fa-solid fa-circle-info"></i> |
| 2125 | 2083 | <span>Prefills won't work when function calling is enabled and any tools are registered.</span> |
| 2126 | 2084 | </div> |
| 2127 | - <label for="claude_use_sysprompt" class="checkbox_label widthFreeExpand"> | |
| 2128 | - <input id="claude_use_sysprompt" type="checkbox" /> | |
| 2129 | - <span data-i18n="Use system prompt">Use system prompt</span> | |
| 2130 | - </label> | |
| 2131 | - <div class="toggle-description justifyLeft marginBot5"> | |
| 2132 | - <span data-i18n="Send the system prompt for supported models. If disabled, the user message is added to the beginning of the prompt."> | |
| 2133 | - Send the system prompt for supported models. If disabled, the user message is added to the beginning of the prompt. | |
| 2134 | - </span> | |
| 2135 | - </div> | |
| 2136 | 2085 | </div> |
| 2137 | 2086 | </div> |
| 2138 | 2087 | <div class="range-block m-t-1" data-source="openai,aimlapi,openrouter,custom,electronhub,azure_openai"> |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "يجمع الرسائل المتتالية للنظام في رسالة واحدة (باستثناء الحوارات المثالية). قد يحسن التتابع لبعض النماذج.", |
| 236 | 236 | "Enable function calling": "تمكين استدعاء الوظيفة", |
| 237 | 237 | "Send inline images": "إرسال الصور المضمنة", |
| 238 | 238 | "image_inlining_hint_1": "يرسل الصورملفات الوسائط في المطالبات إذا كان النموذج يدعمها .", |
| 239 | 239 | "image_inlining_hint_2": "الإجراء على أي رسالة أو", |
| 240 | 240 | "image_inlining_hint_3": "القائمة لإرفاق ملف صورة للدردشة.", |
| 241 | 241 | "Inline Image Quality": "جودة الصورة المضمنة", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Kombiniert aufeinanderfolgende Systemnachrichten zu einer (ausschließlich Beispiel-Dialoge ausgeschlossen). Kann die Kohärenz für einige Modelle verbessern.", |
| 236 | 236 | "Enable function calling": "Funktionsaufruf aktivieren", |
| 237 | 237 | "Send inline images": "Inline-Bilder senden", |
| 238 | 238 | "image_inlining_hint_1": "Sendet BilderMediendateien in Eingabeaufforderungen, wenn das Modell dies unterstützt.", |
| 239 | 239 | "image_inlining_hint_2": "Aktion auf eine Nachricht oder die", |
| 240 | 240 | "image_inlining_hint_3": "Menü, um eine Bilddatei an den Chat anzuhängen.", |
| 241 | 241 | "Inline Image Quality": "Inline-Bildqualität", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina mensajes del sistema consecutivos en uno solo (excluyendo diálogos de ejemplo). Puede mejorar la coherencia para algunos modelos.", |
| 236 | 236 | "Enable function calling": "Habilitar llamada a función", |
| 237 | 237 | "Send inline images": "Enviar imágenes en línea", |
| 238 | 238 | "image_inlining_hint_1": "Envía imágenesarchivos multimedia en mensajes si el modelo lo admite.", |
| 239 | 239 | "image_inlining_hint_2": "acción sobre cualquier mensaje o el", |
| 240 | 240 | "image_inlining_hint_3": "menú para adjuntar un archivo de imagen al chat.", |
| 241 | 241 | "Inline Image Quality": "Calidad de imagen en línea", |
| @@ -227,7 +227,7 @@ | ||
| 227 | 227 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combine les messages système consécutifs en un seul (à l'exclusion des dialogues d'exemple). Peut améliorer la cohérence pour certains modèles.", |
| 228 | 228 | "Enable function calling": "Activer l'appel de fonction", |
| 229 | 229 | "Send inline images": "Envoyer des images en ligne", |
| 230 | 230 | "image_inlining_hint_1": "Envoie des imagesfichiers multimédias dans les prompts si le modèle le prend en charge.", |
| 231 | 231 | "image_inlining_hint_2": "action sur n'importe quel message ou le", |
| 232 | 232 | "image_inlining_hint_3": "menu pour joindre un fichier image au chat.", |
| 233 | 233 | "Inline Image Quality": "Qualité d'image en ligne", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Sameinar samhliða kerfisskilaboð í eitt (sem er utan umsagna dæmum). Getur bætt samfelldni fyrir sumar módel.", |
| 236 | 236 | "Enable function calling": "Virkja aðgerðarkall", |
| 237 | 237 | "Send inline images": "Senda myndir í línu", |
| 238 | 238 | "image_inlining_hint_1": "Sendir myndirmargmiðlunarskrár í skilaboðum ef líkanið styður það.", |
| 239 | 239 | "image_inlining_hint_2": "aðgerð á hvaða skilaboðum sem er eða", |
| 240 | 240 | "image_inlining_hint_3": "valmynd til að hengja myndskrá við spjallið.", |
| 241 | 241 | "Inline Image Quality": "Innbyggð myndgæði", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina i messaggi di sistema consecutivi in uno solo (escludendo i dialoghi di esempio). Potrebbe migliorare la coerenza per alcuni modelli.", |
| 236 | 236 | "Enable function calling": "Abilita la chiamata alla funzione", |
| 237 | 237 | "Send inline images": "Invia immagini inline", |
| 238 | 238 | "image_inlining_hint_1": "Invia immaginifile multimediali nei prompt se il modello lo supporta.", |
| 239 | 239 | "image_inlining_hint_2": "azione su qualsiasi messaggio o il", |
| 240 | 240 | "image_inlining_hint_3": "menu per allegare un file immagine alla chat.", |
| 241 | 241 | "Inline Image Quality": "Qualità dell'immagine in linea", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "連続するシステムメッセージを1つに結合します(例のダイアログを除く)。一部のモデルの一貫性を向上させる可能性があります。", |
| 236 | 236 | "Enable function calling": "関数呼び出しを有効にする", |
| 237 | 237 | "Send inline images": "インライン画像を送信", |
| 238 | 238 | "image_inlining_hint_1": "モデルがサポートしている場合、プロンプトで画像を送信しますプロンプトでメディアファイルを送信します。", |
| 239 | 239 | "image_inlining_hint_2": "メッセージに対するアクションまたは", |
| 240 | 240 | "image_inlining_hint_3": "チャットに画像ファイルを添付するためのメニュー。", |
| 241 | 241 | "Inline Image Quality": "インライン画像品質", |
| @@ -237,7 +237,7 @@ | ||
| 237 | 237 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "연속된 시스템 메시지를 하나로 결합합니다(예제 대화 제외). 일부 모델의 일관성을 향상시킬 수 있습니다.", |
| 238 | 238 | "Enable function calling": "함수 호출 활성화", |
| 239 | 239 | "Send inline images": "인라인 이미지 전송", |
| 240 | 240 | "image_inlining_hint_1": "모델이 지원하는 경우 메시지로 이미지를미디어 파일을 보냅니다.", |
| 241 | 241 | "Inline Image Quality": "인라인 이미지 품질", |
| 242 | 242 | "openai_inline_image_quality_auto": "자동", |
| 243 | 243 | "openai_inline_image_quality_low": "낮은", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combineert opeenvolgende systeemberichten tot één (exclusief voorbeeld dialogen). Kan de coherentie verbeteren voor sommige modellen.", |
| 236 | 236 | "Enable function calling": "Schakel functieaanroepen in", |
| 237 | 237 | "Send inline images": "Inline afbeeldingen verzenden", |
| 238 | 238 | "image_inlining_hint_1": "Verzendt afbeeldingenmediabestanden in prompts als het model dit ondersteunt.", |
| 239 | 239 | "Inline Image Quality": "Inline-beeldkwaliteit", |
| 240 | 240 | "openai_inline_image_quality_auto": "Auto", |
| 241 | 241 | "openai_inline_image_quality_low": "Laag", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina mensagens do sistema consecutivas em uma (excluindo diálogos de exemplo). Pode melhorar a coerência para alguns modelos.", |
| 236 | 236 | "Enable function calling": "Habilitar chamada de função", |
| 237 | 237 | "Send inline images": "Enviar imagens inline", |
| 238 | 238 | "image_inlining_hint_1": "Envia imagensficheiros multimédia em prompts se o modelo suportar.", |
| 239 | 239 | "Inline Image Quality": "Qualidade de imagem embutida", |
| 240 | 240 | "openai_inline_image_quality_auto": "Auto", |
| 241 | 241 | "openai_inline_image_quality_low": "Baixo", |
| @@ -1020,7 +1020,7 @@ | ||
| 1020 | 1020 | "The prompt to be sent.": "Текст промпта.", |
| 1021 | 1021 | "prompt_manager_forbid_overrides": "Запретить перезапись", |
| 1022 | 1022 | "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Карточка персонажа не сможет перезаписать этот промпт, даже если настройки отдают приоритет именно ей.", |
| 1023 | 1023 | "image_inlining_hint_1": "Отправлять картинкимедиафайлы как часть промпта, если позволяет модель.", |
| 1024 | 1024 | "Contest Winners": "Победители конкурса", |
| 1025 | 1025 | "Rename Background": "Переименовать фон", |
| 1026 | 1026 | "Lock": "Закрепить", |
| @@ -2443,7 +2443,6 @@ | ||
| 2443 | 2443 | "Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking.": "Отводит часть ответа под рассуждения (Минимальные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 95%), но минимум 1024 токена. При выборе значение Авто рассуждения не запрашиваются.", |
| 2444 | 2444 | "Use system prompt": "Включить системный промпт", |
| 2445 | 2445 | "Send inline videos": "Отправлять inline-видео", |
| 2446 | - "video_inlining_hint_1": "Отправляет модели видео, если она поддерживает такую возможность.", | |
| 2447 | 2446 | "video_inlining_hint_4": "Видео должно весить не более 20 Мб и длиться не дольше 1 минуты.", |
| 2448 | 2447 | "Allocates a portion of the response length for thinking (Flash 2.5/Pro 2.5) (min: 0/128 tokens, low: 10%, medium: 25%, high: 50%, max: 24576/32768 tokens). Auto lets the model decide.": "Отводит часть ответа под рассуждения (Flash 2.5/Pro 2.5) (Минимальные: 0/128 токенов, Поверхностные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 24576/32768 токенов). При выборе значения Авто модель определяет объём самостоятельно.", |
| 2449 | 2448 | "Google Vertex AI Configuration": "Настройки Google Vertex AI", |
| @@ -241,7 +241,7 @@ | ||
| 241 | 241 | "Allows the model to return its thinking process.": "อนุญาตให้โมเดลส่งคืนกระบวนการคิดของตัวเอง", |
| 242 | 242 | "This setting affects visibility only.": "การตั้งค่านี้มีผลต่อการมองเห็นเท่านั้น", |
| 243 | 243 | "Send inline images": "ส่งรูปภาพแบบ inline", |
| 244 | 244 | "image_inlining_hint_1": "ส่งรูปภาพในพรอมตงไฟล์สื่อในพรอมต์หากโมเดลรองรับ", |
| 245 | 245 | "Inline Image Quality": "คุณภาพรูปภาพ Inline", |
| 246 | 246 | "openai_inline_image_quality_auto": "อัตโนมัติ", |
| 247 | 247 | "openai_inline_image_quality_low": "ต่ำ", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Об'єднує послідовні системні повідомлення в одне (крім прикладів діалогів). Може покращити співпрацю для деяких моделей.", |
| 236 | 236 | "Enable function calling": "Увімкнути виклик функцій", |
| 237 | 237 | "Send inline images": "Надсилати вбудовані зображення", |
| 238 | 238 | "image_inlining_hint_1": "Надсилає зображеннямедіафайли у підказках, якщо модель це підтримує.", |
| 239 | 239 | "Inline Image Quality": "Якість вбудованого зображення", |
| 240 | 240 | "openai_inline_image_quality_auto": "Авто", |
| 241 | 241 | "openai_inline_image_quality_low": "Низький", |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Kết hợp các tin nhắn hệ thống liên tiếp thành một (loại bỏ các đoạn hội thoại mẫu). Có thể cải thiện tính nhất quán cho một số model.", |
| 236 | 236 | "Enable function calling": "Sử dụng tính năng gọi hàm (function calling)", |
| 237 | 237 | "Send inline images": "Gửi hình ảnh nội bộ", |
| 238 | 238 | "image_inlining_hint_1": "Gửi hìnhtệp ảnhphương tiện theo Prompt nếu kiểu máy hỗ trợ.", |
| 239 | 239 | "Inline Image Quality": "Chất lượng hình ảnh nội tuyến", |
| 240 | 240 | "openai_inline_image_quality_auto": "Tự động", |
| 241 | 241 | "openai_inline_image_quality_low": "Thấp", |
| @@ -269,13 +269,12 @@ | ||
| 269 | 269 | "enable_functions_desc_3": "可以被各种扩展利用来提供附加功能。", |
| 270 | 270 | "enable_functions_desc_4": "当提示词后处理没有选择工具时不支持。", |
| 271 | 271 | "Send inline images": "发送图片", |
| 272 | 272 | "image_inlining_hint_1": "如果模型支持,就可以在提示词中发送图片就可以在提示词中发送媒体文件。", |
| 273 | 273 | "Inline Image Quality": "图片画质", |
| 274 | 274 | "openai_inline_image_quality_auto": "自动", |
| 275 | 275 | "openai_inline_image_quality_low": "低", |
| 276 | 276 | "openai_inline_image_quality_high": "高", |
| 277 | 277 | "Send inline videos": "发送视频", |
| 278 | - "video_inlining_hint_1": "当模型支持时,将视频发送给模型。", | |
| 279 | 278 | "video_inlining_hint_4": "视频必须在 20MB 以下且时长不超过1分钟。", |
| 280 | 279 | "Request inline images": "请求图片返回", |
| 281 | 280 | "Allows the model to return image attachments.": "允许模型返回图片附件。", |
| @@ -236,7 +236,7 @@ | ||
| 236 | 236 | "Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "將連續的系統訊息合併為一個(不包括對話範例)。可能會提高某些模型的一致性。", |
| 237 | 237 | "Enable function calling": "啟用函式呼叫", |
| 238 | 238 | "Send inline images": "傳送內嵌圖片", |
| 239 | 239 | "image_inlining_hint_1": "如果模型支援,則在提示詞中傳送圖片則在提示詞中傳送媒體檔案。", |
| 240 | 240 | "Inline Image Quality": "內嵌圖片品質", |
| 241 | 241 | "openai_inline_image_quality_auto": "自動", |
| 242 | 242 | "openai_inline_image_quality_low": "低", |
| @@ -2648,7 +2648,6 @@ | ||
| 2648 | 2648 | "Min Keep": "最小保留", |
| 2649 | 2649 | "enable_functions_desc_4": "當使用「無工具」提示後處理時不支援!", |
| 2650 | 2650 | "Send inline videos": "傳送內嵌影片", |
| 2651 | - "video_inlining_hint_1": "若模型支援,則在提示中傳送影片。", | |
| 2652 | 2651 | "video_inlining_hint_4": "影片大小必須小於 20 MB 且長度低於 1 分鐘", |
| 2653 | 2652 | "This setting affects visibility only.": "此設定僅影響可見性。", |
| 2654 | 2653 | "Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking.": "為推理部分分配回應長度(最大回應長度至少需 1024 符元,低:10%、中:25%、高:50%、最高:95%)。選擇「自動」將不請求推理。", |
| @@ -427,8 +427,7 @@ export class ChatCompletionService { | ||
| 427 | 427 | reverse_proxy, |
| 428 | 428 | proxy_password, |
| 429 | 429 | custom_prompt_post_processing, |
| 430 | 430 | use_makersuite_syspromptuse_sysprompt: true, |
| 431 | - claude_use_sysprompt: true, | |
| 432 | 431 | ...props, |
| 433 | 432 | }; |
| 434 | 433 | |
| @@ -310,7 +310,6 @@ export const settingsToUpdate = { | ||
| 310 | 310 | zai_endpoint: ['#zai_endpoint', 'zai_endpoint', false, true], |
| 311 | 311 | openai_max_context: ['#openai_max_context', 'openai_max_context', false, false], |
| 312 | 312 | openai_max_tokens: ['#openai_max_tokens', 'openai_max_tokens', false, false], |
| 313 | - wrap_in_quotes: ['#wrap_in_quotes', 'wrap_in_quotes', true, false], | |
| 314 | 313 | names_behavior: ['#names_behavior', 'names_behavior', false, false], |
| 315 | 314 | send_if_empty: ['#send_if_empty_textarea', 'send_if_empty', false, false], |
| 316 | 315 | impersonation_prompt: ['#impersonation_prompt_textarea', 'impersonation_prompt', false, false], |
| @@ -331,16 +330,12 @@ export const settingsToUpdate = { | ||
| 331 | 330 | proxy_password: ['#openai_proxy_password', 'proxy_password', false, true], |
| 332 | 331 | assistant_prefill: ['#claude_assistant_prefill', 'assistant_prefill', false, false], |
| 333 | 332 | assistant_impersonation: ['#claude_assistant_impersonation', 'assistant_impersonation', false, false], |
| 334 | 333 | claude_use_syspromptuse_sysprompt: ['#claude_use_syspromptuse_sysprompt', 'claude_use_syspromptuse_sysprompt', true, false], |
| 335 | - use_makersuite_sysprompt: ['#use_makersuite_sysprompt', 'use_makersuite_sysprompt', true, false], | |
| 336 | 334 | vertexai_auth_mode: ['#vertexai_auth_mode', 'vertexai_auth_mode', false, true], |
| 337 | 335 | vertexai_region: ['#vertexai_region', 'vertexai_region', false, true], |
| 338 | 336 | vertexai_express_project_id: ['#vertexai_express_project_id', 'vertexai_express_project_id', false, true], |
| 339 | 337 | squash_system_messagesmedia_inlining: ['#squash_system_messagesopenai_media_inlining', 'squash_system_messagesmedia_inlining', true, false], |
| 340 | - image_inlining: ['#openai_image_inlining', 'image_inlining', true, false], | |
| 341 | 338 | inline_image_quality: ['#openai_inline_image_quality', 'inline_image_quality', false, false], |
| 342 | - video_inlining: ['#openai_video_inlining', 'video_inlining', true, false], | |
| 343 | - audio_inlining: ['#openai_audio_inlining', 'audio_inlining', true, false], | |
| 344 | 339 | continue_prefill: ['#continue_prefill', 'continue_prefill', true, false], |
| 345 | 340 | continue_postfix: ['#continue_postfix', 'continue_postfix', false, false], |
| 346 | 341 | function_calling: ['#openai_function_calling', 'function_calling', true, false], |
| @@ -371,7 +366,6 @@ const default_settings = { | ||
| 371 | 366 | stream_openai: false, |
| 372 | 367 | openai_max_context: max_4k, |
| 373 | 368 | openai_max_tokens: 300, |
| 374 | - wrap_in_quotes: false, | |
| 375 | 369 | ...chatCompletionDefaultPrompts, |
| 376 | 370 | ...promptManagerDefaultPromptOrders, |
| 377 | 371 | send_if_empty: '', |
| @@ -432,16 +426,12 @@ const default_settings = { | ||
| 432 | 426 | proxy_password: '', |
| 433 | 427 | assistant_prefill: '', |
| 434 | 428 | assistant_impersonation: '', |
| 435 | 429 | claude_use_syspromptuse_sysprompt: false, |
| 436 | - use_makersuite_sysprompt: true, | |
| 437 | 430 | vertexai_auth_mode: 'express', |
| 438 | 431 | vertexai_region: 'us-central1', |
| 439 | 432 | vertexai_express_project_id: '', |
| 440 | 433 | squash_system_messagesmedia_inlining: falsetrue, |
| 441 | - image_inlining: true, | |
| 442 | 434 | inline_image_quality: 'auto', |
| 443 | - video_inlining: true, | |
| 444 | - audio_inlining: true, | |
| 445 | 435 | bypass_status_check: false, |
| 446 | 436 | continue_prefill: false, |
| 447 | 437 | function_calling: false, |
| @@ -552,8 +542,6 @@ function setOpenAIMessages(chat) { | ||
| 552 | 542 | // remove caret return (waste of tokens) |
| 553 | 543 | content = content.replace(/\r/gm, ''); |
| 554 | 544 | |
| 555 | - // Apply the "wrap in quotes" option | |
| 556 | - if (role == 'user' && oai_settings.wrap_in_quotes) content = `"${content}"`; | |
| 557 | 545 | const name = chat[j]['name']; |
| 558 | 546 | const media = chat[j]?.extra?.media; |
| 559 | 547 | const mediaDisplay = getMediaDisplay(chat[j]); |
| @@ -1460,10 +1448,6 @@ export async function prepareOpenAIMessages({ | ||
| 1460 | 1448 | // Pass chat completion to prompt manager for inspection |
| 1461 | 1449 | promptManager.setChatCompletion(chatCompletion); |
| 1462 | 1450 | |
| 1463 | - if (oai_settings.squash_system_messages && dryRun == false) { | |
| 1464 | - await chatCompletion.squashSystemMessages(); | |
| 1465 | - } | |
| 1466 | - | |
| 1467 | 1451 | // All information is up-to-date, render. |
| 1468 | 1452 | if (false === dryRun) promptManager.render(false); |
| 1469 | 1453 | } |
| @@ -2369,7 +2353,7 @@ async function sendOpenAIRequest(type, messages, signal, { jsonSchema = null } = | ||
| 2369 | 2353 | |
| 2370 | 2354 | if (isClaude) { |
| 2371 | 2355 | generate_data['top_k'] = Number(oai_settings.top_k_openai); |
| 2372 | 2356 | generate_data['claude_use_syspromptuse_sysprompt'] = oai_settings.claude_use_syspromptuse_sysprompt; |
| 2373 | 2357 | generate_data['stop'] = getCustomStoppingStrings(); // Claude shouldn't have limits on stop strings. |
| 2374 | 2358 | // Don't add a prefill on quiet gens (summarization) and when using continue prefill. |
| 2375 | 2359 | if (!isQuiet && !(isContinue && oai_settings.continue_prefill)) { |
| @@ -2396,7 +2380,7 @@ async function sendOpenAIRequest(type, messages, signal, { jsonSchema = null } = | ||
| 2396 | 2380 | const stopStringsLimit = 5; |
| 2397 | 2381 | generate_data['top_k'] = Number(oai_settings.top_k_openai); |
| 2398 | 2382 | generate_data['stop'] = getCustomStoppingStrings(stopStringsLimit).slice(0, stopStringsLimit).filter(x => x.length >= 1 && x.length <= 16); |
| 2399 | 2383 | generate_data['use_makersuite_syspromptuse_sysprompt'] = oai_settings.use_makersuite_syspromptuse_sysprompt; |
| 2400 | 2384 | if (isVertexAI) { |
| 2401 | 2385 | generate_data['vertexai_auth_mode'] = oai_settings.vertexai_auth_mode; |
| 2402 | 2386 | generate_data['vertexai_region'] = oai_settings.vertexai_region; |
| @@ -3290,47 +3274,6 @@ class MessageCollection { | ||
| 3290 | 3274 | * |
| 3291 | 3275 | */ |
| 3292 | 3276 | export class ChatCompletion { |
| 3293 | - | |
| 3294 | - /** | |
| 3295 | - * Combines consecutive system messages into one if they have no name attached. | |
| 3296 | - * @returns {Promise<void>} | |
| 3297 | - */ | |
| 3298 | - async squashSystemMessages() { | |
| 3299 | - const excludeList = ['newMainChat', 'newChat', 'groupNudge']; | |
| 3300 | - this.messages.collection = this.messages.flatten(); | |
| 3301 | - | |
| 3302 | - let lastMessage = null; | |
| 3303 | - let squashedMessages = []; | |
| 3304 | - | |
| 3305 | - for (let message of this.messages.collection) { | |
| 3306 | - // Force exclude empty messages | |
| 3307 | - if (message.role === 'system' && !message.content) { | |
| 3308 | - continue; | |
| 3309 | - } | |
| 3310 | - | |
| 3311 | - const shouldSquash = (message) => { | |
| 3312 | - return !excludeList.includes(message.identifier) && message.role === 'system' && !message.name; | |
| 3313 | - }; | |
| 3314 | - | |
| 3315 | - if (shouldSquash(message)) { | |
| 3316 | - if (lastMessage && shouldSquash(lastMessage)) { | |
| 3317 | - lastMessage.content += '\n' + message.content; | |
| 3318 | - lastMessage.tokens = await tokenHandler.countAsync({ role: lastMessage.role, content: lastMessage.content }); | |
| 3319 | - } | |
| 3320 | - else { | |
| 3321 | - squashedMessages.push(message); | |
| 3322 | - lastMessage = message; | |
| 3323 | - } | |
| 3324 | - } | |
| 3325 | - else { | |
| 3326 | - squashedMessages.push(message); | |
| 3327 | - lastMessage = message; | |
| 3328 | - } | |
| 3329 | - } | |
| 3330 | - | |
| 3331 | - this.messages.collection = squashedMessages; | |
| 3332 | - } | |
| 3333 | - | |
| 3334 | 3277 | /** |
| 3335 | 3278 | * Initializes a new instance of ChatCompletion. |
| 3336 | 3279 | * Sets up the initial token budget and a new message collection. |
| @@ -3644,6 +3587,40 @@ export class ChatCompletion { | ||
| 3644 | 3587 | } |
| 3645 | 3588 | |
| 3646 | 3589 | /** |
| 3590 | + * Migrate old Chat Completion settings to new format. | |
| 3591 | + * @param {ChatCompletionSettings} settings Settings to migrate | |
| 3592 | + */ | |
| 3593 | +function migrateChatCompletionSettings(settings) { | |
| 3594 | + const migrateMap = [ | |
| 3595 | + { oldKey: 'names_in_completion', oldValue: true, newKey: 'names_behavior', newValue: character_names_behavior.COMPLETION }, | |
| 3596 | + { oldKey: 'chat_completion_source', oldValue: 'palm', newKey: 'chat_completion_source', newValue: chat_completion_sources.MAKERSUITE }, | |
| 3597 | + { oldKey: 'custom_prompt_post_processing', oldValue: custom_prompt_post_processing_types.CLAUDE, newKey: 'custom_prompt_post_processing', newValue: custom_prompt_post_processing_types.MERGE }, | |
| 3598 | + { oldKey: 'ai21_model', oldValue: /^j2-/, newKey: 'ai21_model', newValue: 'jamba-large' }, | |
| 3599 | + { oldKey: 'image_inlining', oldValue: false, newKey: 'media_inlining', newValue: false }, | |
| 3600 | + { oldKey: 'image_inlining', oldValue: true, newKey: 'media_inlining', newValue: true }, | |
| 3601 | + { oldKey: 'video_inlining', oldValue: true, newKey: 'media_inlining', newValue: true }, | |
| 3602 | + { oldKey: 'audio_inlining', oldValue: true, newKey: 'media_inlining', newValue: true }, | |
| 3603 | + { oldKey: 'claude_use_sysprompt', oldValue: true, newKey: 'use_sysprompt', newValue: true }, | |
| 3604 | + { oldKey: 'use_makersuite_sysprompt', oldValue: true, newKey: 'use_sysprompt', newValue: true }, | |
| 3605 | + { oldKey: 'mistralai_model', oldValue: /^(mistral-medium|mistral-small)$/, newKey: 'mistralai_model', newValue: (settings.mistralai_model + '-latest') }, | |
| 3606 | + ]; | |
| 3607 | + | |
| 3608 | + for (const migration of migrateMap) { | |
| 3609 | + if (Object.hasOwn(settings, migration.oldKey)) { | |
| 3610 | + const shouldMigrate = migration.oldValue instanceof RegExp | |
| 3611 | + ? migration.oldValue.test(settings[migration.oldKey]) | |
| 3612 | + : settings[migration.oldKey] === migration.oldValue; | |
| 3613 | + if (shouldMigrate) { | |
| 3614 | + settings[migration.newKey] = migration.newValue; | |
| 3615 | + } | |
| 3616 | + if (migration.oldKey !== migration.newKey) { | |
| 3617 | + delete settings[migration.oldKey]; | |
| 3618 | + } | |
| 3619 | + } | |
| 3620 | + } | |
| 3621 | +} | |
| 3622 | + | |
| 3623 | +/** | |
| 3647 | 3624 | * Load OpenAI settings from backend data |
| 3648 | 3625 | * @param {any} data Settings data from backend |
| 3649 | 3626 | * @param {ChatCompletionSettings} settings Saved settings from backend |
| @@ -3667,23 +3644,7 @@ function loadOpenAISettings(data, settings) { | ||
| 3667 | 3644 | }); |
| 3668 | 3645 | openai_setting_names = settingNames; |
| 3669 | 3646 | |
| 3670 | - const migrateMap = [ | |
| 3647 | + migrateChatCompletionSettings(settings); | |
| 3671 | - { oldKey: 'names_in_completion', oldValue: true, newKey: 'names_behavior', newValue: character_names_behavior.COMPLETION }, | |
| 3672 | - { oldKey: 'chat_completion_source', oldValue: 'palm', newKey: 'chat_completion_source', newValue: chat_completion_sources.MAKERSUITE }, | |
| 3673 | - { oldKey: 'custom_prompt_post_processing', oldValue: custom_prompt_post_processing_types.CLAUDE, newKey: 'custom_prompt_post_processing', newValue: custom_prompt_post_processing_types.MERGE }, | |
| 3674 | - { oldKey: 'ai21_model', oldValue: /^j2-/, newKey: 'ai21_model', newValue: 'jamba-large' }, | |
| 3675 | - ]; | |
| 3676 | - | |
| 3677 | - for (const migration of migrateMap) { | |
| 3678 | - if (Object.hasOwn(settings, migration.oldKey)) { | |
| 3679 | - const shouldMigrate = migration.oldValue instanceof RegExp | |
| 3680 | - ? migration.oldValue.test(settings[migration.oldKey]) | |
| 3681 | - : settings[migration.oldKey] === migration.oldValue; | |
| 3682 | - if (shouldMigrate) { | |
| 3683 | - settings[migration.newKey] = migration.newValue; | |
| 3684 | - } | |
| 3685 | - } | |
| 3686 | - } | |
| 3687 | 3648 | |
| 3688 | 3649 | for (const key of Object.keys(default_settings)) { |
| 3689 | 3650 | oai_settings[key] = settings[key] ?? default_settings[key]; |
| @@ -4319,15 +4280,7 @@ function onSettingsPresetChange() { | ||
| 4319 | 4280 | |
| 4320 | 4281 | const preset = structuredClone(openai_settings[openai_setting_names[oai_settings.preset_settings_openai]]); |
| 4321 | 4282 | |
| 4322 | - // Migrate old settings | |
| 4283 | + migrateChatCompletionSettings(preset); | |
| 4323 | - if (preset.names_in_completion === true && preset.names_behavior === undefined) { | |
| 4324 | - preset.names_behavior = character_names_behavior.COMPLETION; | |
| 4325 | - } | |
| 4326 | - | |
| 4327 | - // Claude: Assistant Impersonation Prefill = Inherit from Assistant Prefill | |
| 4328 | - if (preset.assistant_prefill !== undefined && preset.assistant_impersonation === undefined) { | |
| 4329 | - preset.assistant_impersonation = preset.assistant_prefill; | |
| 4330 | - } | |
| 4331 | 4284 | |
| 4332 | 4285 | const updateInput = (selector, value) => $(selector).val(value).trigger('input', { source: 'preset' }); |
| 4333 | 4286 | const updateCheckbox = (selector, value) => $(selector).prop('checked', value).trigger('input', { source: 'preset' }); |
| @@ -4739,11 +4692,6 @@ async function onModelChange() { | ||
| 4739 | 4692 | console.debug('Null MistralAI model selected. Ignoring.'); |
| 4740 | 4693 | return; |
| 4741 | 4694 | } |
| 4742 | - // Upgrade old mistral models to new naming scheme | |
| 4743 | - // would have done this in loadOpenAISettings, but it wasn't updating on preset change? | |
| 4744 | - if (value === 'mistral-medium' || value === 'mistral-small') { | |
| 4745 | - value = value + '-latest'; | |
| 4746 | - } | |
| 4747 | 4695 | console.log('MistralAI model changed to', value); |
| 4748 | 4696 | oai_settings.mistralai_model = value; |
| 4749 | 4697 | $('#model_mistralai_select').val(oai_settings.mistralai_model); |
| @@ -5436,7 +5384,7 @@ export function isImageInliningSupported() { | ||
| 5436 | 5384 | return false; |
| 5437 | 5385 | } |
| 5438 | 5386 | |
| 5439 | 5387 | if (!oai_settings.image_inliningmedia_inlining) { |
| 5440 | 5388 | return false; |
| 5441 | 5389 | } |
| 5442 | 5390 | |
| @@ -5551,7 +5499,7 @@ export function isVideoInliningSupported() { | ||
| 5551 | 5499 | return false; |
| 5552 | 5500 | } |
| 5553 | 5501 | |
| 5554 | 5502 | if (!oai_settings.video_inliningmedia_inlining) { |
| 5555 | 5503 | return false; |
| 5556 | 5504 | } |
| 5557 | 5505 | |
| @@ -5584,7 +5532,7 @@ export function isAudioInliningSupported() { | ||
| 5584 | 5532 | return false; |
| 5585 | 5533 | } |
| 5586 | 5534 | |
| 5587 | 5535 | if (!oai_settings.audio_inliningmedia_inlining) { |
| 5588 | 5536 | return false; |
| 5589 | 5537 | } |
| 5590 | 5538 | |
| @@ -5968,18 +5916,8 @@ export function initOpenAI() { | ||
| 5968 | 5916 | saveSettingsDebounced(); |
| 5969 | 5917 | }); |
| 5970 | 5918 | |
| 5971 | 5919 | $('#wrap_in_quotesuse_sysprompt').on('change', function () { |
| 5972 | 5920 | oai_settings.wrap_in_quotesuse_sysprompt = !!$('#wrap_in_quotesuse_sysprompt').prop('checked'); |
| 5973 | - saveSettingsDebounced(); | |
| 5974 | - }); | |
| 5975 | - | |
| 5976 | - $('#claude_use_sysprompt').on('change', function () { | |
| 5977 | - oai_settings.claude_use_sysprompt = !!$('#claude_use_sysprompt').prop('checked'); | |
| 5978 | - saveSettingsDebounced(); | |
| 5979 | - }); | |
| 5980 | - | |
| 5981 | - $('#use_makersuite_sysprompt').on('change', function () { | |
| 5982 | - oai_settings.use_makersuite_sysprompt = !!$('#use_makersuite_sysprompt').prop('checked'); | |
| 5983 | 5921 | saveSettingsDebounced(); |
| 5984 | 5922 | }); |
| 5985 | 5923 | |
| @@ -6174,13 +6112,8 @@ export function initOpenAI() { | ||
| 6174 | 6112 | saveSettingsDebounced(); |
| 6175 | 6113 | }); |
| 6176 | 6114 | |
| 6177 | 6115 | $('#squash_system_messagesopenai_media_inlining').on('input', function () { |
| 6178 | 6116 | oai_settings.squash_system_messagesmedia_inlining = !!$(this).prop('checked'); |
| 6179 | - saveSettingsDebounced(); | |
| 6180 | - }); | |
| 6181 | - | |
| 6182 | - $('#openai_image_inlining').on('input', function () { | |
| 6183 | - oai_settings.image_inlining = !!$(this).prop('checked'); | |
| 6184 | 6117 | updateFeatureSupportFlags(); |
| 6185 | 6118 | saveSettingsDebounced(); |
| 6186 | 6119 | }); |
| @@ -6190,18 +6123,6 @@ export function initOpenAI() { | ||
| 6190 | 6123 | saveSettingsDebounced(); |
| 6191 | 6124 | }); |
| 6192 | 6125 | |
| 6193 | - $('#openai_video_inlining').on('input', function () { | |
| 6194 | - oai_settings.video_inlining = !!$(this).prop('checked'); | |
| 6195 | - updateFeatureSupportFlags(); | |
| 6196 | - saveSettingsDebounced(); | |
| 6197 | - }); | |
| 6198 | - | |
| 6199 | - $('#openai_audio_inlining').on('input', function () { | |
| 6200 | - oai_settings.audio_inlining = !!$(this).prop('checked'); | |
| 6201 | - updateFeatureSupportFlags(); | |
| 6202 | - saveSettingsDebounced(); | |
| 6203 | - }); | |
| 6204 | - | |
| 6205 | 6126 | $('#continue_prefill').on('input', function () { |
| 6206 | 6127 | oai_settings.continue_prefill = !!$(this).prop('checked'); |
| 6207 | 6128 | saveSettingsDebounced(); |
| @@ -158,7 +158,7 @@ async function sendClaudeRequest(request, response) { | ||
| 158 | 158 | const additionalHeaders = {}; |
| 159 | 159 | const betaHeaders = ['output-128k-2025-02-19']; |
| 160 | 160 | const useTools = Array.isArray(request.body.tools) && request.body.tools.length > 0; |
| 161 | 161 | const useSystemPrompt = Boolean(request.body.claude_use_syspromptuse_sysprompt); |
| 162 | 162 | const convertedPrompt = convertClaudeMessages(request.body.messages, request.body.assistant_prefill, useSystemPrompt, useTools, getPromptNames(request)); |
| 163 | 163 | const useThinking = /^claude-(3-7|opus-4|sonnet-4|haiku-4-5|opus-4-5)/.test(request.body.model); |
| 164 | 164 | const useWebSearch = /^claude-(3-5|3-7|opus-4|sonnet-4|haiku-4-5|opus-4-5)/.test(request.body.model) && Boolean(request.body.enable_web_search); |
| @@ -406,7 +406,7 @@ async function sendMakerSuiteRequest(request, response) { | ||
| 406 | 406 | generationConfig.responseModalities = ['text', 'image']; |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | const useSystemPrompt = !enableImageModality && !isGemma && request.body.use_makersuite_syspromptuse_sysprompt; |
| 410 | 410 | |
| 411 | 411 | const tools = []; |
| 412 | 412 | const prompt = convertGooglePrompt(request.body.messages, model, useSystemPrompt, getPromptNames(request)); |