Merge pull request #2852 from SillyTavern/deprecate-cc-or-instruct Deprecate forced instruct on OpenRouter for Chat Completion

981697fda5d82a75c7e26ca9ea2056f31ebba11e

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

Signed
19 files changed, +8 -212Ignore whitespace
default/content/presets/openai/Default.json+0 -1
@@ -5,7 +5,6 @@
5 "windowai_model": "",5 "windowai_model": "",
6 "openrouter_model": "OR_Website",6 "openrouter_model": "OR_Website",
7 "openrouter_use_fallback": false,7 "openrouter_use_fallback": false,
8 "openrouter_force_instruct": false,
9 "openrouter_group_models": false,8 "openrouter_group_models": false,
10 "openrouter_sort_models": "alphabetically",9 "openrouter_sort_models": "alphabetically",
11 "ai21_model": "jamba-1.5-large",10 "ai21_model": "jamba-1.5-large",
public/index.html+4 -16
@@ -2797,22 +2797,10 @@
2797 <span data-i18n="Allow fallback providers">Allow fallback providers</span>2797 <span data-i18n="Allow fallback providers">Allow fallback providers</span>
2798 </label>2798 </label>
2799 </div>2799 </div>
2800 <div class="marginTopBot5">2800 <small class="marginTopBot5">
2801 <label for="openrouter_force_instruct" class="checkbox_label">2801 <i class="fa-solid fa-lightbulb"></i>
2802 <input id="openrouter_force_instruct" type="checkbox" />2802 <span>To use instruct formatting, switch to OpenRouter under Text Completion API.</span>
2803 <span class="flex-container alignItemsBaseline" title="This option is outdated and will be removed in the future. To use instruct formatting, please switch to OpenRouter under Text Completion API instead." data-i18n="[title]openrouter_force_instruct">2803 </small>
2804 <i class="fa-solid fa-circle-exclamation neutral_warning"></i>
2805 <b data-i18n="LEGACY">LEGACY</b>
2806 </span>
2807 <span data-i18n="Force Instruct Mode formatting">Force Instruct Mode formatting</span>
2808 </label>
2809 <div class="toggle-description justifyLeft wide100p">
2810 <span data-i18n="Force_Instruct_Mode_formatting_Description">
2811 If both Instruct Mode and this are enabled, the prompt will be formatted by SillyTavern using the current
2812 advanced formatting settings (except instruct System Prompt). If disabled, the prompt will be formatted by OpenRouter.
2813 </span>
2814 </div>
2815 </div>
2816 </form>2804 </form>
2817 <form id="scale_form" data-source="scale" action="javascript:void(null);" method="post" enctype="multipart/form-data">2805 <form id="scale_form" data-source="scale" action="javascript:void(null);" method="post" enctype="multipart/form-data">
2818 <div id="normal_scale_form">2806 <div id="normal_scale_form">
public/locales/ar-sa.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "ضع نماذج OpenAI في مجموعة واحدة، والنماذج الإنسانية في مجموعة أخرى، وما إلى ذلك. ويمكن دمجها مع الفرز.",381 "Group by vendors Description": "ضع نماذج OpenAI في مجموعة واحدة، والنماذج الإنسانية في مجموعة أخرى، وما إلى ذلك. ويمكن دمجها مع الفرز.",
382 "Allow fallback routes": "السماح بمسارات الاحتياط",382 "Allow fallback routes": "السماح بمسارات الاحتياط",
383 "Allow fallback routes Description": "يختار النموذج البديل تلقائيًا إذا كان النموذج المحدد غير قادر على تلبية طلبك.",383 "Allow fallback routes Description": "يختار النموذج البديل تلقائيًا إذا كان النموذج المحدد غير قادر على تلبية طلبك.",
384 "openrouter_force_instruct": "هذا الخيار قديم وسيتم إزالته في المستقبل. لاستخدام تنسيق التعليمات، يرجى التبديل إلى OpenRouter ضمن Text Completion API بدلاً من ذلك.",
385 "LEGACY": "إرث",
386 "Force Instruct Mode formatting": "فرض تنسيق وضع التعليمات",
387 "Force_Instruct_Mode_formatting_Description": "إذا تم تمكين وضع التعليمات وهذا، فسيتم تنسيق المطالبة بواسطة SillyTavern باستخدام التيار\n إعدادات التنسيق المتقدمة (باستثناء توجيه موجه النظام). إذا تم تعطيله، فسيتم تنسيق المطالبة بواسطة OpenRouter.",
388 "Scale API Key": "مفتاح API لـ Scale",384 "Scale API Key": "مفتاح API لـ Scale",
389 "Clear your cookie": "امسح ملف تعريف الارتباط الخاص بك",385 "Clear your cookie": "امسح ملف تعريف الارتباط الخاص بك",
390 "Alt Method": "طريقة بديلة",386 "Alt Method": "طريقة بديلة",
public/locales/de-de.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Platzieren Sie OpenAI-Modelle in einer Gruppe, anthropogene Modelle in einer anderen Gruppe usw. Kann mit Sortierung kombiniert werden.",381 "Group by vendors Description": "Platzieren Sie OpenAI-Modelle in einer Gruppe, anthropogene Modelle in einer anderen Gruppe usw. Kann mit Sortierung kombiniert werden.",
382 "Allow fallback routes": "Fallback-Routen zulassen",382 "Allow fallback routes": "Fallback-Routen zulassen",
383 "Allow fallback routes Description": "Das alternative Modell wird automatisch ausgewählt, wenn das ausgewählte Modell Ihre Anfrage nicht erfüllen kann.",383 "Allow fallback routes Description": "Das alternative Modell wird automatisch ausgewählt, wenn das ausgewählte Modell Ihre Anfrage nicht erfüllen kann.",
384 "openrouter_force_instruct": "Diese Option ist veraltet und wird in Zukunft entfernt. Um die Formatierung mit Anweisungen zu verwenden, wechseln Sie stattdessen zu OpenRouter unter Text Completion API.",
385 "LEGACY": "VERMÄCHTNIS",
386 "Force Instruct Mode formatting": "Formatierung im Force Instruct Mode",
387 "Force_Instruct_Mode_formatting_Description": "Wenn sowohl der Anweisungsmodus als auch dieser aktiviert sind, wird die Eingabeaufforderung von SillyTavern mit den aktuellen erweiterten Formatierungseinstellungen formatiert (außer „Anweisungssystem-Eingabeaufforderung“). Wenn deaktiviert, wird die Eingabeaufforderung von OpenRouter formatiert.",
388 "Scale API Key": "Scale API-Schlüssel",384 "Scale API Key": "Scale API-Schlüssel",
389 "Clear your cookie": "Löschen Sie Ihre Cookies",385 "Clear your cookie": "Löschen Sie Ihre Cookies",
390 "Alt Method": "Alternative Methode",386 "Alt Method": "Alternative Methode",
public/locales/es-es.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Coloque los modelos OpenAI en un grupo, los modelos antrópicos en otro grupo, etc. Se puede combinar con la clasificación.",381 "Group by vendors Description": "Coloque los modelos OpenAI en un grupo, los modelos antrópicos en otro grupo, etc. Se puede combinar con la clasificación.",
382 "Allow fallback routes": "Permitir rutas de respaldo",382 "Allow fallback routes": "Permitir rutas de respaldo",
383 "Allow fallback routes Description": "El modelo alternativo se elige automáticamente si el modelo seleccionado no puede cumplir con tu solicitud.",383 "Allow fallback routes Description": "El modelo alternativo se elige automáticamente si el modelo seleccionado no puede cumplir con tu solicitud.",
384 "openrouter_force_instruct": "Esta opción está desactualizada y se eliminará en el futuro. Para utilizar el formato de instrucciones, cambie a OpenRouter en API de finalización de texto.",
385 "LEGACY": "LEGADO",
386 "Force Instruct Mode formatting": "Forzar formato en modo de instrucción",
387 "Force_Instruct_Mode_formatting_Description": "Si tanto el modo de instrucción como este están habilitados, SillyTavern formateará el mensaje usando el formato actual.\n configuraciones de formato avanzadas (excepto instrucciones del mensaje del sistema). Si está deshabilitado, OpenRouter formateará el mensaje.",
388 "Scale API Key": "Clave API de Scale",384 "Scale API Key": "Clave API de Scale",
389 "Clear your cookie": "Limpia tu cookie",385 "Clear your cookie": "Limpia tu cookie",
390 "Alt Method": "Método alternativo",386 "Alt Method": "Método alternativo",
public/locales/fr-fr.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Placez les modèles OpenAI dans un groupe, les modèles Anthropic dans un autre groupe, etc. Peut être combiné avec le tri.",381 "Group by vendors Description": "Placez les modèles OpenAI dans un groupe, les modèles Anthropic dans un autre groupe, etc. Peut être combiné avec le tri.",
382 "Allow fallback routes": "Autoriser les itinéraires de secours",382 "Allow fallback routes": "Autoriser les itinéraires de secours",
383 "Allow fallback routes Description": "Le modèle alternatif est automatiquement sélectionné si le modèle choisi ne peut pas répondre à votre demande.",383 "Allow fallback routes Description": "Le modèle alternatif est automatiquement sélectionné si le modèle choisi ne peut pas répondre à votre demande.",
384 "openrouter_force_instruct": "Cette option est obsolète et sera supprimée à l'avenir. Pour utiliser le formatage des instructions, veuillez plutôt passer à OpenRouter sous API de saisie semi-automatique de texte.",
385 "LEGACY": "HÉRITAGE",
386 "Force Instruct Mode formatting": "Forcer le formatage du mode instruction",
387 "Force_Instruct_Mode_formatting_Description": "Si le mode Instruct et celui-ci sont activés, l'invite sera formatée par SillyTavern en utilisant le mode actuel.\n paramètres de formatage avancés (à l'exception de l'invite système). Si elle est désactivée, l'invite sera formatée par OpenRouter.",
388 "Scale API Key": "Clé API Scale",384 "Scale API Key": "Clé API Scale",
389 "Clear your cookie": "Effacer vos cookies",385 "Clear your cookie": "Effacer vos cookies",
390 "Alt Method": "Méthode alternative",386 "Alt Method": "Méthode alternative",
public/locales/is-is.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Setjið OpenAI módel í einn hóp, Anthropic módel í annan hóp osfrv. Hægt að sameina við flokkun.",381 "Group by vendors Description": "Setjið OpenAI módel í einn hóp, Anthropic módel í annan hóp osfrv. Hægt að sameina við flokkun.",
382 "Allow fallback routes": "Leyfa bakfallssvæði",382 "Allow fallback routes": "Leyfa bakfallssvæði",
383 "Allow fallback routes Description": "Veldur hlutleysa vélbúnaðarinn við val þinn ef valið módel getur ekki uppfyllt beiðni þína.",383 "Allow fallback routes Description": "Veldur hlutleysa vélbúnaðarinn við val þinn ef valið módel getur ekki uppfyllt beiðni þína.",
384 "openrouter_force_instruct": "Þessi valkostur er úreltur og verður fjarlægður í framtíðinni. Til að nota leiðbeiningarsnið skaltu skipta yfir í OpenRouter undir Text Completion API í staðinn.",
385 "LEGACY": "ARFIÐ",
386 "Force Instruct Mode formatting": "Force Instruct Mode formatting",
387 "Force_Instruct_Mode_formatting_Description": "Ef bæði leiðbeiningarhamur og þessi eru virkjuð, verður kvaðningurinn sniðinn af SillyTavern með því að nota núverandi\n háþróaðar sniðstillingar (nema leiðbeiningar um System Prompt). Ef slökkt er á henni verður hvetjan sniðin af OpenRouter.",
388 "Scale API Key": "Lykill API fyrir Scale",384 "Scale API Key": "Lykill API fyrir Scale",
389 "Clear your cookie": "Hreinsaðu kökuna þína",385 "Clear your cookie": "Hreinsaðu kökuna þína",
390 "Alt Method": "Aðferð Bakmenn",386 "Alt Method": "Aðferð Bakmenn",
public/locales/it-it.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Metti i modelli OpenAI in un gruppo, i modelli antropici in un altro gruppo, ecc. Può essere combinato con l'ordinamento.",381 "Group by vendors Description": "Metti i modelli OpenAI in un gruppo, i modelli antropici in un altro gruppo, ecc. Può essere combinato con l'ordinamento.",
382 "Allow fallback routes": "Consenti percorsi alternativi",382 "Allow fallback routes": "Consenti percorsi alternativi",
383 "Allow fallback routes Description": "Il modello alternativo viene automaticamente scelto se il modello selezionato non può soddisfare la tua richiesta.",383 "Allow fallback routes Description": "Il modello alternativo viene automaticamente scelto se il modello selezionato non può soddisfare la tua richiesta.",
384 "openrouter_force_instruct": "Questa opzione è obsoleta e verrà rimossa in futuro. Per usare la formattazione instruct, passa a OpenRouter in Text Completion API.",
385 "LEGACY": "EREDITÀ",
386 "Force Instruct Mode formatting": "Forza la formattazione della modalità istruzione",
387 "Force_Instruct_Mode_formatting_Description": "Se sia la modalità Instruct che questa sono abilitate, il prompt verrà formattato da SillyTavern utilizzando il file current\n impostazioni di formattazione avanzate (ad eccezione del prompt di sistema). Se disabilitato, il prompt verrà formattato da OpenRouter.",
388 "Scale API Key": "Chiave API di Scale",384 "Scale API Key": "Chiave API di Scale",
389 "Clear your cookie": "Cancella il tuo cookie",385 "Clear your cookie": "Cancella il tuo cookie",
390 "Alt Method": "Metodo alternativo",386 "Alt Method": "Metodo alternativo",
public/locales/ja-jp.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "OpenAI モデルを 1 つのグループに、Anthropic モデルを別のグループに配置するなどします。ソートと組み合わせることができます。",381 "Group by vendors Description": "OpenAI モデルを 1 つのグループに、Anthropic モデルを別のグループに配置するなどします。ソートと組み合わせることができます。",
382 "Allow fallback routes": "フォールバックルートを許可",382 "Allow fallback routes": "フォールバックルートを許可",
383 "Allow fallback routes Description": "選択したモデルが要求を満たせない場合、代替モデルが自動的に選択されます。",383 "Allow fallback routes Description": "選択したモデルが要求を満たせない場合、代替モデルが自動的に選択されます。",
384 "openrouter_force_instruct": "このオプションは古く、将来削除される予定です。指示されたフォーマットを使用するには、代わりにテキスト補完 API の OpenRouter に切り替えてください。",
385 "LEGACY": "遺産",
386 "Force Instruct Mode formatting": "強制指示モードのフォーマット",
387 "Force_Instruct_Mode_formatting_Description": "Instruct Mode とこれが両方とも有効になっている場合、プロンプトは SillyTavern によって現在の高度なフォーマット設定 (instruct System Prompt を除く) を使用してフォーマットされます。無効になっている場合、プロンプトは OpenRouter によってフォーマットされます。",
388 "Scale API Key": "ScaleのAPIキー",384 "Scale API Key": "ScaleのAPIキー",
389 "Clear your cookie": "クッキーを消去する",385 "Clear your cookie": "クッキーを消去する",
390 "Alt Method": "代替手法",386 "Alt Method": "代替手法",
public/locales/ko-kr.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "OpenAI 모델을 한 그룹에 넣고, Anthropic 모델을 다른 그룹에 두는 등 정렬을 통해 결합할 수 있습니다.",381 "Group by vendors Description": "OpenAI 모델을 한 그룹에 넣고, Anthropic 모델을 다른 그룹에 두는 등 정렬을 통해 결합할 수 있습니다.",
382 "Allow fallback routes": "대체 경로 허용",382 "Allow fallback routes": "대체 경로 허용",
383 "Allow fallback routes Description": "선택한 모델이 요청을 처리할 수 없는 경우 대체 모델이 자동으로 선택됩니다.",383 "Allow fallback routes Description": "선택한 모델이 요청을 처리할 수 없는 경우 대체 모델이 자동으로 선택됩니다.",
384 "openrouter_force_instruct": "이 옵션은 오래되었으며 향후 제거될 예정입니다. 지시 형식을 사용하려면 대신 Text Completion API에서 OpenRouter로 전환하세요.",
385 "LEGACY": "유산",
386 "Force Instruct Mode formatting": "강제 지시 모드 포맷",
387 "Force_Instruct_Mode_formatting_Description": "Instruct Mode와 이 모드가 모두 활성화된 경우 프롬프트는 SillyTavern에 의해 현재 형식을 사용하여 형식화됩니다.\n 고급 형식 설정(시스템 프롬프트 지시 제외) 비활성화된 경우 프롬프트는 OpenRouter에 의해 형식화됩니다.",
388 "Scale API Key": "Scale API 키",384 "Scale API Key": "Scale API 키",
389 "Clear your cookie": "쿠키 지우기",385 "Clear your cookie": "쿠키 지우기",
390 "Alt Method": "대체 방법",386 "Alt Method": "대체 방법",
public/locales/nl-nl.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Plaats OpenAI-modellen in één groep, antropische modellen in een andere groep, enz. Kan worden gecombineerd met sorteren.",381 "Group by vendors Description": "Plaats OpenAI-modellen in één groep, antropische modellen in een andere groep, enz. Kan worden gecombineerd met sorteren.",
382 "Allow fallback routes": "Fallback-routes toestaan",382 "Allow fallback routes": "Fallback-routes toestaan",
383 "Allow fallback routes Description": "Het alternatieve model wordt automatisch gekozen als het geselecteerde model niet aan uw verzoek kan voldoen.",383 "Allow fallback routes Description": "Het alternatieve model wordt automatisch gekozen als het geselecteerde model niet aan uw verzoek kan voldoen.",
384 "openrouter_force_instruct": "Deze optie is verouderd en zal in de toekomst worden verwijderd. Om instructie-opmaak te gebruiken, schakelt u in plaats daarvan over naar OpenRouter onder Text Completion API.",
385 "LEGACY": "NALATENSCHAP",
386 "Force Instruct Mode formatting": "Forceer de opmaak van de instructiemodus",
387 "Force_Instruct_Mode_formatting_Description": "Als zowel de Instruct-modus als deze zijn ingeschakeld, wordt de prompt door SillyTavern geformatteerd met behulp van de current\n geavanceerde opmaakinstellingen (behalve de opdracht Systeemprompt). Indien uitgeschakeld, wordt de prompt geformatteerd door OpenRouter.",
388 "Scale API Key": "Scale API-sleutel",384 "Scale API Key": "Scale API-sleutel",
389 "Clear your cookie": "Wis uw cookie",385 "Clear your cookie": "Wis uw cookie",
390 "Alt Method": "Alternatieve methode",386 "Alt Method": "Alternatieve methode",
public/locales/pt-pt.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Coloque os modelos OpenAI em um grupo, os modelos antrópicos em outro grupo, etc.",381 "Group by vendors Description": "Coloque os modelos OpenAI em um grupo, os modelos antrópicos em outro grupo, etc.",
382 "Allow fallback routes": "Permitir rotas de fallback",382 "Allow fallback routes": "Permitir rotas de fallback",
383 "Allow fallback routes Description": "O modelo alternativo será escolhido automaticamente se o modelo selecionado não puder atender à sua solicitação.",383 "Allow fallback routes Description": "O modelo alternativo será escolhido automaticamente se o modelo selecionado não puder atender à sua solicitação.",
384 "openrouter_force_instruct": "Esta opção está desatualizada e será removida no futuro. Para usar a formatação de instruções, mude para OpenRouter em Text Completion API.",
385 "LEGACY": "LEGADO",
386 "Force Instruct Mode formatting": "Forçar formatação do modo de instrução",
387 "Force_Instruct_Mode_formatting_Description": "Se o Modo Instruir e este estiverem habilitados, o prompt será formatado pelo SillyTavern usando o atual\n configurações avançadas de formatação (exceto instruir o prompt do sistema). Se desativado, o prompt será formatado pelo OpenRouter.",
388 "Scale API Key": "Chave da API Scale",384 "Scale API Key": "Chave da API Scale",
389 "Clear your cookie": "Limpe seu cookie",385 "Clear your cookie": "Limpe seu cookie",
390 "Alt Method": "Método Alternativo",386 "Alt Method": "Método Alternativo",
public/locales/ru-ru.json+0 -4
@@ -732,8 +732,6 @@
732 "Context Size": "По размеру контекста",732 "Context Size": "По размеру контекста",
733 "Group by vendors": "Сгруппировать по владельцу",733 "Group by vendors": "Сгруппировать по владельцу",
734 "Group by vendors Description": "Модели от OpenAI попадут в одну группу, от Anthropic - в другую, и т.д. Можно комбинировать с сортировкой.",734 "Group by vendors Description": "Модели от OpenAI попадут в одну группу, от Anthropic - в другую, и т.д. Можно комбинировать с сортировкой.",
735 "LEGACY": "УСТАР.",
736 "Force Instruct Mode formatting": "Включить форматирование для Instruct-режима",
737 "Allow Jailbreak": "Разрешить джейлбрейк",735 "Allow Jailbreak": "Разрешить джейлбрейк",
738 "System Prompt Wrapping": "Обрамление для системного промпта",736 "System Prompt Wrapping": "Обрамление для системного промпта",
739 "System Prompt Prefix": "Префикс системного промпта",737 "System Prompt Prefix": "Префикс системного промпта",
@@ -1270,8 +1268,6 @@
1270 "vLLM Model": "Модель vLLM",1268 "vLLM Model": "Модель vLLM",
1271 "Aphrodite Model": "Модель Aphrodite",1269 "Aphrodite Model": "Модель Aphrodite",
1272 "Peek a password": "Посмотреть пароль",1270 "Peek a password": "Посмотреть пароль",
1273 "openrouter_force_instruct": "This option is outdated and will be removed in the future. To use instruct formatting, please switch to OpenRouter under Text Completion API instead.",
1274 "Force_Instruct_Mode_formatting_Description": "If both Instruct Mode and this are enabled, the prompt will be formatted by SillyTavern using the current\n advanced formatting settings (except instruct System Prompt). If disabled, the prompt will be formatted by OpenRouter.",
1275 "Clear your cookie": "Clear your cookie",1271 "Clear your cookie": "Clear your cookie",
1276 "Add Chat Start and Example Separator to a list of stopping strings.": "Использовать Начало чата и Разделитель примеров сообщений в качестве стоп-строк.",1272 "Add Chat Start and Example Separator to a list of stopping strings.": "Использовать Начало чата и Разделитель примеров сообщений в качестве стоп-строк.",
1277 "context_allow_jailbreak": "Если в карточке есть джейлбрейк И ПРИ ЭТОМ включена опция \"Приоритет джейлбрейку из карточки персонажа\", то этот джейлбрейк добавляется в конец промпта.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.",1273 "context_allow_jailbreak": "Если в карточке есть джейлбрейк И ПРИ ЭТОМ включена опция \"Приоритет джейлбрейку из карточки персонажа\", то этот джейлбрейк добавляется в конец промпта.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.",
public/locales/uk-ua.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Помістіть моделі OpenAI в одну групу, моделі Anthropic в іншу групу тощо. Можна поєднати з сортуванням.",381 "Group by vendors Description": "Помістіть моделі OpenAI в одну групу, моделі Anthropic в іншу групу тощо. Можна поєднати з сортуванням.",
382 "Allow fallback routes": "Дозволити резервні маршрути",382 "Allow fallback routes": "Дозволити резервні маршрути",
383 "Allow fallback routes Description": "Автоматично вибирає альтернативну модель, якщо вибрана модель не може задовольнити ваш запит.",383 "Allow fallback routes Description": "Автоматично вибирає альтернативну модель, якщо вибрана модель не може задовольнити ваш запит.",
384 "openrouter_force_instruct": "Цей параметр застарів і буде видалено в майбутньому. Щоб використовувати форматування інструкцій, перейдіть натомість до OpenRouter у розділі Text Completion API.",
385 "LEGACY": "СПАДОК",
386 "Force Instruct Mode formatting": "Примусове форматування в режимі вказівок",
387 "Force_Instruct_Mode_formatting_Description": "Якщо ввімкнути обидва режими Instruction і цей режим, підказка буде відформатована SillyTavern за допомогою поточного\n розширені параметри форматування (крім системного запиту). Якщо вимкнено, запит буде відформатовано OpenRouter.",
388 "Scale API Key": "Ключ API для Scale",384 "Scale API Key": "Ключ API для Scale",
389 "Clear your cookie": "Очистіть файл cookie",385 "Clear your cookie": "Очистіть файл cookie",
390 "Alt Method": "Альтернативний метод",386 "Alt Method": "Альтернативний метод",
public/locales/vi-vn.json+0 -4
@@ -381,10 +381,6 @@
381 "Group by vendors Description": "Xếp các mô hình OpenAI vào một nhóm, các mô hình Anthropic vào một nhóm khác, v.v. Có thể kết hợp với việc sắp xếp.",381 "Group by vendors Description": "Xếp các mô hình OpenAI vào một nhóm, các mô hình Anthropic vào một nhóm khác, v.v. Có thể kết hợp với việc sắp xếp.",
382 "Allow fallback routes": "Cho phép các tuyến đường phụ",382 "Allow fallback routes": "Cho phép các tuyến đường phụ",
383 "Allow fallback routes Description": "Bot thay thế tự động nếu mô hình được chọn không thể đáp ứng yêu cầu của bạn.",383 "Allow fallback routes Description": "Bot thay thế tự động nếu mô hình được chọn không thể đáp ứng yêu cầu của bạn.",
384 "openrouter_force_instruct": "Tùy chọn này đã lỗi thời và sẽ bị xóa trong tương lai. Để sử dụng định dạng hướng dẫn, vui lòng chuyển sang OpenRouter trong API hoàn thành văn bản.",
385 "LEGACY": "Cũ",
386 "Force Instruct Mode formatting": "Buộc định dạng Instruct Mode",
387 "Force_Instruct_Mode_formatting_Description": "Nếu cả Instruct Mode và chế độ này được bật, Prompt sẽ được SillyTavern định dạng bằng cách sử dụng\n cài đặt định dạng nâng cao (ngoại trừ hướng dẫn System Nhắc). Nếu bị tắt, Prompt sẽ được OpenRouter định dạng.",
388 "Scale API Key": "Scale API Key",384 "Scale API Key": "Scale API Key",
389 "Clear your cookie": "Xóa cookie",385 "Clear your cookie": "Xóa cookie",
390 "Alt Method": "Phương pháp thay thế",386 "Alt Method": "Phương pháp thay thế",
public/locales/zh-cn.json+0 -4
@@ -397,10 +397,6 @@
397 "Context Size": "上下文大小",397 "Context Size": "上下文大小",
398 "Group by vendors": "按供应商分组",398 "Group by vendors": "按供应商分组",
399 "Group by vendors Description": "将 OpenAI 模型放在一组,将 Anthropic 模型放在另一组,等等。可以与排序结合。",399 "Group by vendors Description": "将 OpenAI 模型放在一组,将 Anthropic 模型放在另一组,等等。可以与排序结合。",
400 "openrouter_force_instruct": "此选项已过时,将来会被删除。要使用指令格式,请改用文本完成 API 下的 OpenRouter。",
401 "LEGACY": "旧版",
402 "Force Instruct Mode formatting": "强制指令模式格式化",
403 "Force_Instruct_Mode_formatting_Description": "如果同时启用了“指示模式”和“系统提示词”,则 SillyTavern 将使用当前\n高级格式设置(指示系统提示词除外)对提示词进行格式化。如果禁用,则 OpenRouter 将对提示词进行格式化。",
404 "Scale API Key": "Scale API密钥",400 "Scale API Key": "Scale API密钥",
405 "Clear your cookie": "清除你的 Cookie",401 "Clear your cookie": "清除你的 Cookie",
406 "Alt Method": "备用方法",402 "Alt Method": "备用方法",
public/locales/zh-tw.json+0 -4
@@ -382,10 +382,6 @@
382 "Group by vendors Description": "將 OpenAI 、 Anthropic 等等的模型放各自供應商的群組中。可以與排序功能結合使用。",382 "Group by vendors Description": "將 OpenAI 、 Anthropic 等等的模型放各自供應商的群組中。可以與排序功能結合使用。",
383 "Allow fallback routes": "允許備援路徑",383 "Allow fallback routes": "允許備援路徑",
384 "Allow fallback routes Description": "如果選擇的模型無法滿足要求,會自動選擇替代模型。",384 "Allow fallback routes Description": "如果選擇的模型無法滿足要求,會自動選擇替代模型。",
385 "openrouter_force_instruct": "這個選項已經過時,將來會被移除。如果要使用指令格式,請改在 Text Completion API 中選擇 OpenRouter。",
386 "LEGACY": "遺留",
387 "Force Instruct Mode formatting": "強制指示模式格式化",
388 "Force_Instruct_Mode_formatting_Description": "如果同時啟用「指令模式」和這個選項,\nSillyTavern 會根據目前的進階格式化設定(不包括指令系統提示)來格式化提示詞。\n如果停用這個選項,提示詞將由 OpenRouter 來進行格式化。",
389 "Scale API Key": "Scale API 金鑰",385 "Scale API Key": "Scale API 金鑰",
390 "Clear your cookie": "清除您的 Cookie",386 "Clear your cookie": "清除您的 Cookie",
391 "Alt Method": "替代方法",387 "Alt Method": "替代方法",
public/script.js+1 -3
@@ -96,7 +96,6 @@ import {
96 openai_messages_count,96 openai_messages_count,
97 chat_completion_sources,97 chat_completion_sources,
98 getChatCompletionModel,98 getChatCompletionModel,
99 isOpenRouterWithInstruct,
100 proxies,99 proxies,
101 loadProxyPresets,100 loadProxyPresets,
102 selected_proxy,101 selected_proxy,
@@ -3946,8 +3945,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
39463945
3947 if (isContinue) {3946 if (isContinue) {
3948 // Coping mechanism for OAI spacing3947 // Coping mechanism for OAI spacing
3949 const isForceInstruct = isOpenRouterWithInstruct();3948 if (main_api === 'openai' && !cyclePrompt.endsWith(' ')) {
3950 if (main_api === 'openai' && !isForceInstruct && !cyclePrompt.endsWith(' ')) {
3951 cyclePrompt += oai_settings.continue_postfix;3949 cyclePrompt += oai_settings.continue_postfix;
3952 continue_mag += oai_settings.continue_postfix;3950 continue_mag += oai_settings.continue_postfix;
3953 }3951 }
public/scripts/openai.js+3 -132
@@ -61,12 +61,6 @@ import {
61 stringFormat,61 stringFormat,
62} from './utils.js';62} from './utils.js';
63import { countTokensOpenAI, getTokenizerModel } from './tokenizers.js';63import { countTokensOpenAI, getTokenizerModel } from './tokenizers.js';
64import {
65 formatInstructModeChat,
66 formatInstructModeExamples,
67 formatInstructModePrompt,
68 formatInstructModeSystemPrompt,
69} from './instruct-mode.js';
70import { isMobile } from './RossAscends-mods.js';64import { isMobile } from './RossAscends-mods.js';
71import { saveLogprobsForActiveMessage } from './logprobs.js';65import { saveLogprobsForActiveMessage } from './logprobs.js';
72import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';66import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
@@ -263,7 +257,6 @@ const default_settings = {
263 windowai_model: '',257 windowai_model: '',
264 openrouter_model: openrouter_website_model,258 openrouter_model: openrouter_website_model,
265 openrouter_use_fallback: false,259 openrouter_use_fallback: false,
266 openrouter_force_instruct: false,
267 openrouter_group_models: false,260 openrouter_group_models: false,
268 openrouter_sort_models: 'alphabetically',261 openrouter_sort_models: 'alphabetically',
269 openrouter_providers: [],262 openrouter_providers: [],
@@ -341,7 +334,6 @@ const oai_settings = {
341 windowai_model: '',334 windowai_model: '',
342 openrouter_model: openrouter_website_model,335 openrouter_model: openrouter_website_model,
343 openrouter_use_fallback: false,336 openrouter_use_fallback: false,
344 openrouter_force_instruct: false,
345 openrouter_group_models: false,337 openrouter_group_models: false,
346 openrouter_sort_models: 'alphabetically',338 openrouter_sort_models: 'alphabetically',
347 openrouter_providers: [],339 openrouter_providers: [],
@@ -417,108 +409,6 @@ async function validateReverseProxy() {
417}409}
418410
419/**411/**
420 * Converts the Chat Completion object to an Instruct Mode prompt string.
421 * @param {object[]} messages Array of messages
422 * @param {string} type Generation type
423 * @returns {string} Text completion prompt
424 */
425function convertChatCompletionToInstruct(messages, type) {
426 const newChatPrompts = [
427 substituteParams(oai_settings.new_chat_prompt),
428 substituteParams(oai_settings.new_example_chat_prompt),
429 substituteParams(oai_settings.new_group_chat_prompt),
430 ];
431 messages = messages.filter(x => !newChatPrompts.includes(x.content));
432
433 let chatMessagesText = '';
434 let systemPromptText = '';
435 let examplesText = '';
436
437 function getPrefix(message) {
438 let prefix;
439
440 if (message.role === 'user' || message.name === 'example_user') {
441 if (selected_group) {
442 prefix = '';
443 } else if (message.name === 'example_user') {
444 prefix = name1;
445 } else {
446 prefix = message.name ?? name1;
447 }
448 }
449
450 if (message.role === 'assistant' || message.name === 'example_assistant') {
451 if (selected_group) {
452 prefix = '';
453 }
454 else if (message.name === 'example_assistant') {
455 prefix = name2;
456 } else {
457 prefix = message.name ?? name2;
458 }
459 }
460
461 return prefix;
462 }
463
464 function toString(message) {
465 if (message.role === 'system' && !message.name) {
466 return message.content;
467 }
468
469 const prefix = getPrefix(message);
470 return prefix ? `${prefix}: ${message.content}` : message.content;
471 }
472
473 const firstChatMessage = messages.findIndex(message => message.role === 'assistant' || message.role === 'user');
474 const systemPromptMessages = messages.slice(0, firstChatMessage).filter(message => message.role === 'system' && !message.name);
475
476 if (systemPromptMessages.length) {
477 systemPromptText = systemPromptMessages.map(message => message.content).join('\n');
478 systemPromptText = formatInstructModeSystemPrompt(systemPromptText);
479 }
480
481 const exampleMessages = messages.filter(x => x.role === 'system' && (x.name === 'example_user' || x.name === 'example_assistant'));
482
483 if (exampleMessages.length) {
484 const blockHeading = power_user.context.example_separator ? (substituteParams(power_user.context.example_separator) + '\n') : '';
485 const examplesArray = exampleMessages.map(m => '<START>\n' + toString(m));
486 examplesText = blockHeading + formatInstructModeExamples(examplesArray, name1, name2).join('');
487 }
488
489 const chatMessages = messages.slice(firstChatMessage);
490
491 if (chatMessages.length) {
492 chatMessagesText = substituteParams(power_user.context.chat_start) + '\n';
493
494 for (const message of chatMessages) {
495 const name = getPrefix(message);
496 const isUser = message.role === 'user';
497 const isNarrator = message.role === 'system';
498 chatMessagesText += formatInstructModeChat(name, message.content, isUser, isNarrator, '', name1, name2, false);
499 }
500 }
501
502 const isImpersonate = type === 'impersonate';
503 const isContinue = type === 'continue';
504 const isQuiet = type === 'quiet';
505 const isQuietToLoud = false; // Quiet to loud not implemented for Chat Completion
506 const promptName = isImpersonate ? name1 : name2;
507 const promptLine = isContinue ? '' : formatInstructModePrompt(promptName, isImpersonate, '', name1, name2, isQuiet, isQuietToLoud).trimStart();
508
509 let prompt = [systemPromptText, examplesText, chatMessagesText, promptLine]
510 .filter(x => x)
511 .map(x => x.endsWith('\n') ? x : `${x}\n`)
512 .join('');
513
514 if (isContinue) {
515 prompt = prompt.replace(/\n$/, '');
516 }
517
518 return prompt;
519}
520
521/**
522 * Formats chat messages into chat completion messages.412 * Formats chat messages into chat completion messages.
523 * @param {object[]} chat - Array containing all messages.413 * @param {object[]} chat - Array containing all messages.
524 * @returns {object[]} - Array containing all messages formatted for chat completion.414 * @returns {object[]} - Array containing all messages formatted for chat completion.
@@ -761,10 +651,6 @@ function populationInjectionPrompts(prompts, messages) {
761 return messages;651 return messages;
762}652}
763653
764export function isOpenRouterWithInstruct() {
765 return oai_settings.chat_completion_source === chat_completion_sources.OPENROUTER && oai_settings.openrouter_force_instruct && power_user.instruct.enabled;
766}
767
768/**654/**
769 * Populates the chat history of the conversation.655 * Populates the chat history of the conversation.
770 * @param {object[]} messages - Array containing all messages.656 * @param {object[]} messages - Array containing all messages.
@@ -795,8 +681,7 @@ async function populateChatHistory(messages, prompts, chatCompletion, type = nul
795681
796 // Reserve budget for continue nudge682 // Reserve budget for continue nudge
797 let continueMessage = null;683 let continueMessage = null;
798 const instruct = isOpenRouterWithInstruct();684 if (type === 'continue' && cyclePrompt && !oai_settings.continue_prefill) {
799 if (type === 'continue' && cyclePrompt && !instruct && !oai_settings.continue_prefill) {
800 const promptObject = {685 const promptObject = {
801 identifier: 'continueNudge',686 identifier: 'continueNudge',
802 role: 'system',687 role: 'system',
@@ -1811,7 +1696,7 @@ async function sendOpenAIRequest(type, messages, signal) {
1811 const isPerplexity = oai_settings.chat_completion_source == chat_completion_sources.PERPLEXITY;1696 const isPerplexity = oai_settings.chat_completion_source == chat_completion_sources.PERPLEXITY;
1812 const isGroq = oai_settings.chat_completion_source == chat_completion_sources.GROQ;1697 const isGroq = oai_settings.chat_completion_source == chat_completion_sources.GROQ;
1813 const is01AI = oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI;1698 const is01AI = oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI;
1814 const isTextCompletion = (isOAI && textCompletionModels.includes(oai_settings.openai_model)) || (isOpenRouter && oai_settings.openrouter_force_instruct && power_user.instruct.enabled);1699 const isTextCompletion = isOAI && textCompletionModels.includes(oai_settings.openai_model);
1815 const isQuiet = type === 'quiet';1700 const isQuiet = type === 'quiet';
1816 const isImpersonate = type === 'impersonate';1701 const isImpersonate = type === 'impersonate';
1817 const isContinue = type === 'continue';1702 const isContinue = type === 'continue';
@@ -1819,11 +1704,6 @@ async function sendOpenAIRequest(type, messages, signal) {
1819 const useLogprobs = !!power_user.request_token_probabilities;1704 const useLogprobs = !!power_user.request_token_probabilities;
1820 const canMultiSwipe = oai_settings.n > 1 && !isContinue && !isImpersonate && !isQuiet && (isOAI || isCustom);1705 const canMultiSwipe = oai_settings.n > 1 && !isContinue && !isImpersonate && !isQuiet && (isOAI || isCustom);
18211706
1822 if (isTextCompletion && isOpenRouter) {
1823 messages = convertChatCompletionToInstruct(messages, type);
1824 replaceItemizedPromptText(messageId, messages);
1825 }
1826
1827 // If we're using the window.ai extension, use that instead1707 // If we're using the window.ai extension, use that instead
1828 // Doesn't support logit bias yet1708 // Doesn't support logit bias yet
1829 if (oai_settings.chat_completion_source == chat_completion_sources.WINDOWAI) {1709 if (oai_settings.chat_completion_source == chat_completion_sources.WINDOWAI) {
@@ -3063,7 +2943,6 @@ function loadOpenAISettings(data, settings) {
3063 oai_settings.openrouter_group_models = settings.openrouter_group_models ?? default_settings.openrouter_group_models;2943 oai_settings.openrouter_group_models = settings.openrouter_group_models ?? default_settings.openrouter_group_models;
3064 oai_settings.openrouter_sort_models = settings.openrouter_sort_models ?? default_settings.openrouter_sort_models;2944 oai_settings.openrouter_sort_models = settings.openrouter_sort_models ?? default_settings.openrouter_sort_models;
3065 oai_settings.openrouter_use_fallback = settings.openrouter_use_fallback ?? default_settings.openrouter_use_fallback;2945 oai_settings.openrouter_use_fallback = settings.openrouter_use_fallback ?? default_settings.openrouter_use_fallback;
3066 oai_settings.openrouter_force_instruct = settings.openrouter_force_instruct ?? default_settings.openrouter_force_instruct;
3067 oai_settings.openrouter_allow_fallbacks = settings.openrouter_allow_fallbacks ?? default_settings.openrouter_allow_fallbacks;2946 oai_settings.openrouter_allow_fallbacks = settings.openrouter_allow_fallbacks ?? default_settings.openrouter_allow_fallbacks;
3068 oai_settings.ai21_model = settings.ai21_model ?? default_settings.ai21_model;2947 oai_settings.ai21_model = settings.ai21_model ?? default_settings.ai21_model;
3069 oai_settings.mistralai_model = settings.mistralai_model ?? default_settings.mistralai_model;2948 oai_settings.mistralai_model = settings.mistralai_model ?? default_settings.mistralai_model;
@@ -3170,7 +3049,6 @@ function loadOpenAISettings(data, settings) {
3170 $('#use_makersuite_sysprompt').prop('checked', oai_settings.use_makersuite_sysprompt);3049 $('#use_makersuite_sysprompt').prop('checked', oai_settings.use_makersuite_sysprompt);
3171 $('#scale-alt').prop('checked', oai_settings.use_alt_scale);3050 $('#scale-alt').prop('checked', oai_settings.use_alt_scale);
3172 $('#openrouter_use_fallback').prop('checked', oai_settings.openrouter_use_fallback);3051 $('#openrouter_use_fallback').prop('checked', oai_settings.openrouter_use_fallback);
3173 $('#openrouter_force_instruct').prop('checked', oai_settings.openrouter_force_instruct);
3174 $('#openrouter_group_models').prop('checked', oai_settings.openrouter_group_models);3052 $('#openrouter_group_models').prop('checked', oai_settings.openrouter_group_models);
3175 $('#openrouter_allow_fallbacks').prop('checked', oai_settings.openrouter_allow_fallbacks);3053 $('#openrouter_allow_fallbacks').prop('checked', oai_settings.openrouter_allow_fallbacks);
3176 $('#openrouter_providers_chat').val(oai_settings.openrouter_providers).trigger('change');3054 $('#openrouter_providers_chat').val(oai_settings.openrouter_providers).trigger('change');
@@ -3398,7 +3276,6 @@ async function saveOpenAIPreset(name, settings, triggerUi = true) {
3398 windowai_model: settings.windowai_model,3276 windowai_model: settings.windowai_model,
3399 openrouter_model: settings.openrouter_model,3277 openrouter_model: settings.openrouter_model,
3400 openrouter_use_fallback: settings.openrouter_use_fallback,3278 openrouter_use_fallback: settings.openrouter_use_fallback,
3401 openrouter_force_instruct: settings.openrouter_force_instruct,
3402 openrouter_group_models: settings.openrouter_group_models,3279 openrouter_group_models: settings.openrouter_group_models,
3403 openrouter_sort_models: settings.openrouter_sort_models,3280 openrouter_sort_models: settings.openrouter_sort_models,
3404 openrouter_providers: settings.openrouter_providers,3281 openrouter_providers: settings.openrouter_providers,
@@ -3835,7 +3712,6 @@ function onSettingsPresetChange() {
3835 windowai_model: ['#model_windowai_select', 'windowai_model', false],3712 windowai_model: ['#model_windowai_select', 'windowai_model', false],
3836 openrouter_model: ['#model_openrouter_select', 'openrouter_model', false],3713 openrouter_model: ['#model_openrouter_select', 'openrouter_model', false],
3837 openrouter_use_fallback: ['#openrouter_use_fallback', 'openrouter_use_fallback', true],3714 openrouter_use_fallback: ['#openrouter_use_fallback', 'openrouter_use_fallback', true],
3838 openrouter_force_instruct: ['#openrouter_force_instruct', 'openrouter_force_instruct', true],
3839 openrouter_group_models: ['#openrouter_group_models', 'openrouter_group_models', false],3715 openrouter_group_models: ['#openrouter_group_models', 'openrouter_group_models', false],
3840 openrouter_sort_models: ['#openrouter_sort_models', 'openrouter_sort_models', false],3716 openrouter_sort_models: ['#openrouter_sort_models', 'openrouter_sort_models', false],
3841 openrouter_providers: ['#openrouter_providers_chat', 'openrouter_providers', false],3717 openrouter_providers: ['#openrouter_providers_chat', 'openrouter_providers', false],
@@ -4807,7 +4683,7 @@ export function isImageInliningSupported() {
4807 case chat_completion_sources.CLAUDE:4683 case chat_completion_sources.CLAUDE:
4808 return visionSupportedModels.some(model => oai_settings.claude_model.includes(model));4684 return visionSupportedModels.some(model => oai_settings.claude_model.includes(model));
4809 case chat_completion_sources.OPENROUTER:4685 case chat_completion_sources.OPENROUTER:
4810 return !oai_settings.openrouter_force_instruct;4686 return true;
4811 case chat_completion_sources.CUSTOM:4687 case chat_completion_sources.CUSTOM:
4812 return true;4688 return true;
4813 case chat_completion_sources.ZEROONEAI:4689 case chat_completion_sources.ZEROONEAI:
@@ -5229,11 +5105,6 @@ export function initOpenAI() {
5229 saveSettingsDebounced();5105 saveSettingsDebounced();
5230 });5106 });
52315107
5232 $('#openrouter_force_instruct').on('input', function () {
5233 oai_settings.openrouter_force_instruct = !!$(this).prop('checked');
5234 saveSettingsDebounced();
5235 });
5236
5237 $('#openrouter_group_models').on('input', function () {5108 $('#openrouter_group_models').on('input', function () {
5238 oai_settings.openrouter_group_models = !!$(this).prop('checked');5109 oai_settings.openrouter_group_models = !!$(this).prop('checked');
5239 saveSettingsDebounced();5110 saveSettingsDebounced();