diff --git a/public/index.html b/public/index.html index 1d3f8d75c..c8a8f8b74 100644 --- a/public/index.html +++ b/public/index.html @@ -6442,21 +6442,19 @@ -
A name for this prompt.
+
A name for this prompt.
-
- To whom this message will be attributed. -
+
To whom this message will be attributed.
@@ -6464,18 +6462,25 @@ -
Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.
+
Relative (to other prompts in prompt manager) or In-chat @ Depth.
-
Injection depth. 0 = after the last message, 1 = before the last message, etc.
+
0 = after the last message, 1 = before the last message, etc.
+
+
+ + +
Ordered from high/top to low/bottom, and at same order: System, User, Assistant.
@@ -6484,7 +6489,6 @@ -
The prompt to be sent.
-
diff --git a/public/locales/ar-sa.json b/public/locales/ar-sa.json index f316a8c73..d58046e14 100644 --- a/public/locales/ar-sa.json +++ b/public/locales/ar-sa.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "لمن ستنسب هذه الرسالة؟", "AI Assistant": "مساعد الذكاء الاصطناعي", "prompt_manager_position": "موضع", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "موضع الحقن. بجوار المطالبات الأخرى (نسبية) أو داخل الدردشة (مطلقة).", + "Next to other prompts (relative) or in-chat (absolute).": "موضع الحقن. بجوار المطالبات الأخرى (نسبية) أو داخل الدردشة (مطلقة).", "prompt_manager_relative": "نسبي", "prompt_manager_depth": "عمق", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "عمق الحقن. 0 = بعد الرسالة الأخيرة، 1 = قبل الرسالة الأخيرة، الخ.", + "0 = after the last message, 1 = before the last message, etc.": "عمق الحقن. 0 = بعد الرسالة الأخيرة، 1 = قبل الرسالة الأخيرة، الخ.", "Prompt": "موضوع", "The prompt to be sent.": "المطالبة ليتم إرسالها.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "لا يمكن تجاوز هذه المطالبة بواسطة بطاقات الأحرف، حتى إذا كان التجاوزات مفضلاً.", diff --git a/public/locales/de-de.json b/public/locales/de-de.json index d66a85c59..360051090 100644 --- a/public/locales/de-de.json +++ b/public/locales/de-de.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "Wem diese Nachricht zugeschrieben wird.", "AI Assistant": "KI-Assistent", "prompt_manager_position": "Position", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Injektionsposition. Neben anderen Eingabeaufforderungen (relativ) oder im Chat (absolut).", + "Next to other prompts (relative) or in-chat (absolute).": "Neben anderen Eingabeaufforderungen (relativ) oder im Chat (absolut).", "prompt_manager_relative": "Relativ", "prompt_manager_depth": "Tiefe", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Injektionstiefe. 0 = nach der letzten Nachricht, 1 = vor der letzten Nachricht usw.", + "0 = after the last message, 1 = before the last message, etc.": "0 = nach der letzten Nachricht, 1 = vor der letzten Nachricht usw.", "Prompt": "Aufforderung", "The prompt to be sent.": "Die zu sendende Eingabeaufforderung.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Diese Eingabeaufforderung kann nicht durch Charakterkarten überschrieben werden, selbst wenn dies bevorzugt wird.", diff --git a/public/locales/es-es.json b/public/locales/es-es.json index fa0ef34bd..fd4200249 100644 --- a/public/locales/es-es.json +++ b/public/locales/es-es.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "A quién se le atribuirá este mensaje.", "AI Assistant": "Asistente de IA", "prompt_manager_position": "Posición", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Posición de inyección. Junto a otras indicaciones (relativa) o en el chat (absoluta).", + "Next to other prompts (relative) or in-chat (absolute).": "Junto a otras indicaciones (relativa) o en el chat (absoluta).", "prompt_manager_relative": "Relativo", "prompt_manager_depth": "Profundidad", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Profundidad de inyección. 0 = después del último mensaje, 1 = antes del último mensaje, etc.", + "0 = after the last message, 1 = before the last message, etc.": "0 = después del último mensaje, 1 = antes del último mensaje, etc.", "Prompt": "Indicar", "The prompt to be sent.": "El mensaje que se enviará.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Este mensaje no puede ser anulado por tarjetas de personaje, incluso si se prefieren las anulaciones.", diff --git a/public/locales/fr-fr.json b/public/locales/fr-fr.json index 631302ca2..1429c3948 100644 --- a/public/locales/fr-fr.json +++ b/public/locales/fr-fr.json @@ -950,7 +950,7 @@ "prompt_manager_position": "Position", "prompt_manager_relative": "Relatif", "prompt_manager_depth": "Profondeur", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Profondeur d'injection. 0 = après le dernier message, 1 = avant le dernier message, etc.", + "0 = after the last message, 1 = before the last message, etc.": "0 = après le dernier message, 1 = avant le dernier message, etc.", "Prompt": "Prompt", "The prompt to be sent.": "Le prompt à envoyer.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Ce prompt ne peut pas être remplacé par les cartes de personnage, même si les remplacements sont préférés.", @@ -1544,7 +1544,7 @@ "Filter to Characters or Tags": "Filtre sur les personnages ou les tags", "Switch the Character/Tags filter around to exclude the listed characters and tags from matching for this entry": "Changez le filtre Personnages/Tags pour exclure les personnages et tags listés de la correspondance pour cette entrée.", "Exclude": "Exclure", - "Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.": "Position d'injection. Relative (par rapport à d'autres prompts dans le gestionnaire de prompts) ou In-chat @ Depth.", + "Relative (to other prompts in prompt manager) or In-chat @ Depth.": "Relative (par rapport à d'autres prompts dans le gestionnaire de prompts) ou In-chat @ Depth.", "prompt_manager_in_chat": "In-chat", "The content of this prompt is pulled from elsewhere and cannot be edited here.": "Le contenu de ce message est tiré d'autres sources et ne peut être modifié ici..", "Open checkpoint chat\nShift+Click to replace the existing checkpoint with a new one": "Cliquer pour ouvrir le chat du point de contrôle\nShift+Click pour remplacer le point de contrôle existant par un nouveau.", diff --git a/public/locales/is-is.json b/public/locales/is-is.json index 7d13d3804..b4e943b7b 100644 --- a/public/locales/is-is.json +++ b/public/locales/is-is.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "Hverjum þessi skilaboð verða eignuð.", "AI Assistant": "AI aðstoðarmaður", "prompt_manager_position": "Staða", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Inndælingarstaða. Við hliðina á öðrum leiðbeiningum (afstætt) eða í spjalli (algert).", + "Next to other prompts (relative) or in-chat (absolute).": "Við hliðina á öðrum leiðbeiningum (afstætt) eða í spjalli (algert).", "prompt_manager_relative": "Aðstandandi", "prompt_manager_depth": "Dýpt", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Inndælingardýpt. 0 = eftir síðustu skilaboð, 1 = fyrir síðustu skilaboð o.s.frv.", + "0 = after the last message, 1 = before the last message, etc.": "0 = eftir síðustu skilaboð, 1 = fyrir síðustu skilaboð o.s.frv.", "Prompt": "Ábending", "The prompt to be sent.": "Tilvitnunin sem á að senda.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Ekki er hægt að hnekkja þessari vísbendingu með persónuspjöldum, jafnvel þótt hnekkingar séu æskilegar.", diff --git a/public/locales/it-it.json b/public/locales/it-it.json index bc648399a..323212b88 100644 --- a/public/locales/it-it.json +++ b/public/locales/it-it.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "A chi verrà attribuito questo messaggio.", "AI Assistant": "Assistente AI", "prompt_manager_position": "Posizione", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Posizione di iniezione. Accanto ad altri suggerimenti (relativo) o in chat (assoluto).", + "Next to other prompts (relative) or in-chat (absolute).": "Accanto ad altri suggerimenti (relativo) o in chat (assoluto).", "prompt_manager_relative": "Parente", "prompt_manager_depth": "Profondità", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Profondità di iniezione. 0 = dopo l'ultimo messaggio, 1 = prima dell'ultimo messaggio, ecc.", + "0 = after the last message, 1 = before the last message, etc.": "0 = dopo l'ultimo messaggio, 1 = prima dell'ultimo messaggio, ecc.", "Prompt": "Prompt", "The prompt to be sent.": "La richiesta da inviare.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Questo prompt non può essere sostituito dalle schede personaggio, anche se si preferisce sostituirlo.", diff --git a/public/locales/ja-jp.json b/public/locales/ja-jp.json index 2ba4bfeb3..aecd9590c 100644 --- a/public/locales/ja-jp.json +++ b/public/locales/ja-jp.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "このメッセージの送信者。", "AI Assistant": "AIアシスタント", "prompt_manager_position": "位置", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "挿入位置。他のプロンプトの隣 (相対) またはチャット内 (絶対)。", + "Next to other prompts (relative) or in-chat (absolute).": "他のプロンプトの隣 (相対) またはチャット内 (絶対)。", "prompt_manager_relative": "相対的", "prompt_manager_depth": "深さ", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "注入の深さ。0 = 最後のメッセージの後、1 = 最後のメッセージの前など。", + "0 = after the last message, 1 = before the last message, etc.": "0 = 最後のメッセージの後、1 = 最後のメッセージの前など。", "Prompt": "プロンプト", "The prompt to be sent.": "送信されるプロンプト。", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "このプロンプトは、オーバーライドが優先される場合でも、キャラクター カードによってオーバーライドすることはできません。", diff --git a/public/locales/ko-kr.json b/public/locales/ko-kr.json index a23331561..eb0e199a0 100644 --- a/public/locales/ko-kr.json +++ b/public/locales/ko-kr.json @@ -1026,11 +1026,11 @@ "To whom this message will be attributed.": "해당 프롬프트에 부여할 역할은 무엇인가요?", "AI Assistant": "AI 어시스턴트", "prompt_manager_position": "위치", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "주입 위치. 다른 프롬프트 옆(상대적) 또는 채팅 내(절대적).", + "Next to other prompts (relative) or in-chat (absolute).": "다른 프롬프트 옆(상대적) 또는 채팅 내(절대적).", "prompt_manager_relative": "상대적인", "prompt_manager_in_chat": "깊이에 따라", "prompt_manager_depth": "깊이", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "주입 깊이. 0 = 마지막 메시지 뒤, 1 = 마지막 메시지 앞 등", + "0 = after the last message, 1 = before the last message, etc.": "0 = 마지막 메시지 뒤, 1 = 마지막 메시지 앞 등", "Prompt": "프롬프트", "The prompt to be sent.": "보내질 프롬프트 내용을 작성하는 부분입니다.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "이 프롬프트는 고급 정의에서 재정의가 선호되는 경우에도 재정의될 수 없습니다.", @@ -1500,7 +1500,7 @@ "enable_functions_desc_1": "다양한 확장 프로그램에서 추가 기능을 제공하기 위한", "enable_functions_desc_2": "기능 도구", "enable_functions_desc_3": "를 사용할 수 있게 합니다.", - "Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.": "삽입 깊이. 상대적인 (프롬프트 관리 목록에 있는 다른 프롬프트들에 비해) 또는 @Depth 깊이에 따라.", + "Relative (to other prompts in prompt manager) or In-chat @ Depth.": "상대적인 (프롬프트 관리 목록에 있는 다른 프롬프트들에 비해) 또는 @Depth 깊이에 따라.", "Instruct Template": "지시 템플릿", "System Message Sequences": "시스템 메시지 시퀀스", "System Prompt Sequences": "시스템 프롬프트 시퀀스", diff --git a/public/locales/nl-nl.json b/public/locales/nl-nl.json index 75d1b1281..0170b4b8a 100644 --- a/public/locales/nl-nl.json +++ b/public/locales/nl-nl.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "Aan wie dit bericht wordt toegeschreven.", "AI Assistant": "AI-assistent", "prompt_manager_position": "Positie", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Injectiepositie. Naast andere prompts (relatief) of in-chat (absoluut).", + "Next to other prompts (relative) or in-chat (absolute).": "Naast andere prompts (relatief) of in-chat (absoluut).", "prompt_manager_relative": "Familielid", "prompt_manager_depth": "Diepte", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Injectiediepte. 0 = na het laatste bericht, 1 = voor het laatste bericht, etc.", + "0 = after the last message, 1 = before the last message, etc.": "0 = na het laatste bericht, 1 = voor het laatste bericht, etc.", "Prompt": "Prompt", "The prompt to be sent.": "De prompt die verzonden moet worden.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Deze prompt kan niet worden overschreven door karakterkaarten, zelfs als overschrijvingen de voorkeur hebben.", diff --git a/public/locales/pt-pt.json b/public/locales/pt-pt.json index 14ec2f0d1..5fcc3a1f2 100644 --- a/public/locales/pt-pt.json +++ b/public/locales/pt-pt.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "A quem esta mensagem será atribuída.", "AI Assistant": "Assistente de IA", "prompt_manager_position": "Posição", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Posição de injeção. Ao lado de outras solicitações (relativas) ou no chat (absolutas).", + "Next to other prompts (relative) or in-chat (absolute).": "Ao lado de outras solicitações (relativas) ou no chat (absolutas).", "prompt_manager_relative": "Relativo", "prompt_manager_depth": "Profundidade", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Profundidade de injeção. 0 = após a última mensagem, 1 = antes da última mensagem, etc.", + "0 = after the last message, 1 = before the last message, etc.": "0 = após a última mensagem, 1 = antes da última mensagem, etc.", "Prompt": "Prompt", "The prompt to be sent.": "O prompt a ser enviado.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Este prompt não pode ser substituído por cartas de personagem, mesmo que as substituições sejam preferidas.", diff --git a/public/locales/ru-ru.json b/public/locales/ru-ru.json index 44db7987d..3a7d1ec1b 100644 --- a/public/locales/ru-ru.json +++ b/public/locales/ru-ru.json @@ -1012,10 +1012,10 @@ "To whom this message will be attributed.": "От чьего лица будет отправляться сообщение.", "AI Assistant": "ИИ-ассистент", "prompt_manager_position": "Точка инжекта", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Как рассчитывать позицию для инжекта. Она может располагаться по отношению к другим промптам (относительная) либо по отношению к чату (абсолютная).", + "Next to other prompts (relative) or in-chat (absolute).": "Она может располагаться по отношению к другим промптам (относительная) либо по отношению к чату (абсолютная).", "prompt_manager_relative": "Относительная", "prompt_manager_depth": "Глубина", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Глубина вставки. 0 = после последнего сообщения, 1 = перед последним сообщением, и т.д.", + "0 = after the last message, 1 = before the last message, etc.": "0 = после последнего сообщения, 1 = перед последним сообщением, и т.д.", "The prompt to be sent.": "Текст промпта.", "prompt_manager_forbid_overrides": "Запретить перезапись", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Карточка персонажа не сможет перезаписать этот промпт, даже если настройки отдают приоритет именно ей.", @@ -1620,7 +1620,7 @@ "Using a proxy that you're not running yourself is a risk to your data privacy.": "Помните, что используя чужую прокси, вы подвергаете риску конфиденциальность своих данных.", "ANY support requests will be REFUSED if you are using a proxy.": "НЕ РАССЧИТЫВАЙТЕ на нашу поддержку, если используете прокси.", "Do not proceed if you do not agree to this!": "Не продолжайте, если не согласны с этими условиями!", - "Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.": "Как рассчитывать позицию, на которую вставляется данный промпт. Относительно других промтов в менеджере, либо на опред. глубину в чате.", + "Relative (to other prompts in prompt manager) or In-chat @ Depth.": "Относительно других промтов в менеджере, либо на опред. глубину в чате.", "prompt_manager_in_chat": "На глубине в чате", "01.AI API Key": "Ключ от API 01.AI", "01.AI Model": "Модель 01.AI", diff --git a/public/locales/uk-ua.json b/public/locales/uk-ua.json index 72e139404..74e0fd6b4 100644 --- a/public/locales/uk-ua.json +++ b/public/locales/uk-ua.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "Кому буде віднесено це повідомлення.", "AI Assistant": "ШІ помічник", "prompt_manager_position": "Позиція", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Позиція ін'єкції. Поруч з іншими підказками (відносні) або в чаті (абсолютні).", + "Next to other prompts (relative) or in-chat (absolute).": "Поруч з іншими підказками (відносні) або в чаті (абсолютні).", "prompt_manager_relative": "Відносна", "prompt_manager_depth": "Глибина", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Глибина ін'єкції. 0 = після останнього повідомлення, 1 = перед останнім повідомленням тощо.", + "0 = after the last message, 1 = before the last message, etc.": "0 = після останнього повідомлення, 1 = перед останнім повідомленням тощо.", "Prompt": "Запит", "The prompt to be sent.": "Підказка для надсилання.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Це підказка не може бути перевизначено картками символів, навіть якщо перевизначення є кращим.", diff --git a/public/locales/vi-vn.json b/public/locales/vi-vn.json index 62342ad72..52428fb23 100644 --- a/public/locales/vi-vn.json +++ b/public/locales/vi-vn.json @@ -1009,10 +1009,10 @@ "To whom this message will be attributed.": "Tin nhắn này sẽ được quy cho ai.", "AI Assistant": "Trợ lý AI", "prompt_manager_position": "Chức vụ", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "Vị trí tiêm. Bên cạnh các Prompt khác (tương đối) hoặc trong trò chuyện (tuyệt đối).", + "Next to other prompts (relative) or in-chat (absolute).": "Bên cạnh các Prompt khác (tương đối) hoặc trong trò chuyện (tuyệt đối).", "prompt_manager_relative": "Liên quan đến", "prompt_manager_depth": "Chiều sâu", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Độ sâu phun. 0 = sau tin nhắn cuối cùng, 1 = trước tin nhắn cuối cùng, v.v.", + "0 = after the last message, 1 = before the last message, etc.": "0 = sau tin nhắn cuối cùng, 1 = trước tin nhắn cuối cùng, v.v.", "Prompt": "Prompt", "The prompt to be sent.": "Lời nhắc được gửi đi.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Lời nhắc này không thể bị ghi đè bằng thẻ ký tự, ngay cả khi ưu tiên ghi đè.", diff --git a/public/locales/zh-cn.json b/public/locales/zh-cn.json index 28dbf3cff..cf7a0e604 100644 --- a/public/locales/zh-cn.json +++ b/public/locales/zh-cn.json @@ -1168,11 +1168,11 @@ "To whom this message will be attributed.": "此消息应归于谁。", "AI Assistant": "AI助手", "prompt_manager_position": "位置", - "Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.": "注入位置。相对(相对于提示管理器中的其他提示)或在聊天中@深度。", + "Relative (to other prompts in prompt manager) or In-chat @ Depth.": "相对(相对于提示管理器中的其他提示)或在聊天中@深度。", "prompt_manager_relative": "相对", "prompt_manager_in_chat": "聊天中", "prompt_manager_depth": "深度", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "注入深度。“0”为在最后一条消息之后,“1”为在最后一条消息之前,等等。", + "0 = after the last message, 1 = before the last message, etc.": "“0”为在最后一条消息之后,“1”为在最后一条消息之前,等等。", "The content of this prompt is pulled from elsewhere and cannot be edited here.": "此提示词的内容是从其他地方提取的,无法在此处进行编辑。", "Prompt": "提示词", "The prompt to be sent.": "要发送的提示词。", diff --git a/public/locales/zh-tw.json b/public/locales/zh-tw.json index a4d77cef5..727111563 100644 --- a/public/locales/zh-tw.json +++ b/public/locales/zh-tw.json @@ -1010,10 +1010,10 @@ "To whom this message will be attributed.": "此訊息所屬的角色。", "AI Assistant": "人工智慧助手", "prompt_manager_position": "位置", - "Injection position. Next to other prompts (relative) or in-chat (absolute).": "注入位置。與其他提示詞相鄰(相對位置)或在聊天中(絕對位置)。", + "Next to other prompts (relative) or in-chat (absolute).": "與其他提示詞相鄰(相對位置)或在聊天中(絕對位置)。", "prompt_manager_relative": "相對位置", "prompt_manager_depth": "深度", - "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "注入深度。0 = 在最後一則訊息之後,1 = 在最後一則訊息之前,以此類推。", + "0 = after the last message, 1 = before the last message, etc.": "0 = 在最後一則訊息之後,1 = 在最後一則訊息之前,以此類推。", "Prompt": "提示詞", "The prompt to be sent.": "要傳送的提示詞。", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "即使啟用優先覆寫,此提示詞也不能被角色卡片覆寫。", @@ -1650,7 +1650,7 @@ "Image Captioning": "圖片註解", "Generate Caption": "產生圖片註解", "Injection Position": "插入位置", - "Injection position. Relative (to other prompts in prompt manager) or In-chat @ Depth.": "插入位置(與提示詞管理器中的其他提示相比)或聊天中的深度位置。", + "Relative (to other prompts in prompt manager) or In-chat @ Depth.": "插入位置(與提示詞管理器中的其他提示相比)或聊天中的深度位置。", "Injection Template": "插入範本", "Insert#": "插入#", "Instruct Sequences": "指令序列", diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index 58403546d..b25f5cb4c 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -77,7 +77,7 @@ const registerPromptManagerMigration = () => { * Represents a prompt. */ class Prompt { - identifier; role; content; name; system_prompt; position; injection_position; injection_depth; forbid_overrides; extension; + identifier; role; content; name; system_prompt; position; injection_position; injection_depth; injection_order; forbid_overrides; extension; /** * Create a new Prompt instance. @@ -91,10 +91,11 @@ class Prompt { * @param {string} [param0.position] - The position of the prompt in the prompt list. * @param {number} [param0.injection_position] - The insert position of the prompt. * @param {number} [param0.injection_depth] - The depth of the prompt in the chat. + * @param {number} [param0.injection_order] - The order of the prompt in the chat. * @param {boolean} [param0.forbid_overrides] - Indicates if the prompt should not be overridden. * @param {boolean} [param0.extension] - Prompt is added by an extension. */ - constructor({ identifier, role, content, name, system_prompt, position, injection_depth, injection_position, forbid_overrides, extension }) { + constructor({ identifier, role, content, name, system_prompt, position, injection_depth, injection_position, forbid_overrides, extension, injection_order } = {}) { this.identifier = identifier; this.role = role; this.content = content; @@ -105,6 +106,7 @@ class Prompt { this.injection_position = injection_position; this.forbid_overrides = forbid_overrides; this.extension = extension ?? false; + this.injection_order = injection_order ?? 0; } } @@ -447,7 +449,9 @@ class PromptManager { document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_prompt').value = prompt.content ?? ''; document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_position').value = prompt.injection_position ?? 0; document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_depth').value = prompt.injection_depth ?? DEFAULT_DEPTH; + document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_order').value = prompt.injection_order ?? 0; document.getElementById(this.configuration.prefix + 'prompt_manager_depth_block').style.visibility = prompt.injection_position === INJECTION_POSITION.ABSOLUTE ? 'visible' : 'hidden'; + document.getElementById(this.configuration.prefix + 'prompt_manager_order_block').style.visibility = prompt.injection_position === INJECTION_POSITION.ABSOLUTE ? 'visible' : 'hidden'; document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_forbid_overrides').checked = prompt.forbid_overrides ?? false; document.getElementById(this.configuration.prefix + 'prompt_manager_forbid_overrides_block').style.visibility = this.overridablePrompts.includes(prompt.identifier) ? 'visible' : 'hidden'; document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_prompt').disabled = prompt.marker ?? false; @@ -782,6 +786,7 @@ class PromptManager { prompt.content = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_prompt').value; prompt.injection_position = Number(document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_position').value); prompt.injection_depth = Number(document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_depth').value); + prompt.injection_order = Number(document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_order').value); prompt.forbid_overrides = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_forbid_overrides').checked; } @@ -1222,7 +1227,9 @@ class PromptManager { const promptField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_prompt'); const injectionPositionField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_position'); const injectionDepthField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_depth'); + const injectionOrderField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_order'); const injectionDepthBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_depth_block'); + const injectionOrderBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_order_block'); const forbidOverridesField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_forbid_overrides'); const forbidOverridesBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_forbid_overrides_block'); const entrySourceBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_source_block'); @@ -1235,7 +1242,9 @@ class PromptManager { promptField.disabled = prompt.marker ?? false; injectionPositionField.value = prompt.injection_position ?? INJECTION_POSITION.RELATIVE; injectionDepthField.value = prompt.injection_depth ?? DEFAULT_DEPTH; + injectionOrderField.value = prompt.injection_order ?? 0; injectionDepthBlock.style.visibility = prompt.injection_position === INJECTION_POSITION.ABSOLUTE ? 'visible' : 'hidden'; + injectionOrderBlock.style.visibility = prompt.injection_position === INJECTION_POSITION.ABSOLUTE ? 'visible' : 'hidden'; injectionPositionField.removeAttribute('disabled'); forbidOverridesField.checked = prompt.forbid_overrides ?? false; forbidOverridesBlock.style.visibility = this.overridablePrompts.includes(prompt.identifier) ? 'visible' : 'hidden'; @@ -1267,11 +1276,14 @@ class PromptManager { handleInjectionPositionChange(event) { const injectionDepthBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_depth_block'); + const injectionOrderBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_order_block'); const injectionPosition = Number(event.target.value); if (injectionPosition === INJECTION_POSITION.ABSOLUTE) { injectionDepthBlock.style.visibility = 'visible'; + injectionOrderBlock.style.visibility = 'visible'; } else { injectionDepthBlock.style.visibility = 'hidden'; + injectionOrderBlock.style.visibility = 'hidden'; } } @@ -1328,6 +1340,7 @@ class PromptManager { const injectionPositionField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_position'); const injectionDepthField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_injection_depth'); const injectionDepthBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_depth_block'); + const injectionOrderBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_order_block'); const forbidOverridesField = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_form_forbid_overrides'); const forbidOverridesBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_forbid_overrides_block'); const entrySourceBlock = document.getElementById(this.configuration.prefix + 'prompt_manager_popup_entry_source_block'); @@ -1341,6 +1354,7 @@ class PromptManager { injectionPositionField.removeAttribute('disabled'); injectionDepthField.value = DEFAULT_DEPTH; injectionDepthBlock.style.visibility = 'unset'; + injectionOrderBlock.style.visibility = 'unset'; forbidOverridesBlock.style.visibility = 'unset'; forbidOverridesField.checked = false; entrySourceBlock.style.display = 'none'; diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 850100eb9..3d269fd07 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -760,22 +760,40 @@ async function populationInjectionPrompts(prompts, messages) { // Get prompts for current depth const depthPrompts = prompts.filter(prompt => prompt.injection_depth === i && prompt.content); - // Order of priority (most important go lower) - const roles = ['system', 'user', 'assistant']; const roleMessages = []; const separator = '\n'; const wrap = false; - for (const role of roles) { - // Get prompts for current role - const rolePrompts = depthPrompts.filter(prompt => prompt.role === role).map(x => x.content).join(separator); - // Get extension prompt - const extensionPrompt = await getExtensionPrompt(extension_prompt_types.IN_CHAT, i, separator, roleTypes[role], wrap); + // Group prompts by priority + const orderGroups = {}; + for (const prompt of depthPrompts) { + const order = prompt.injection_order || 0; + if (!orderGroups[order]) { + orderGroups[order] = []; + } + orderGroups[order].push(prompt); + } - const jointPrompt = [rolePrompts, extensionPrompt].filter(x => x).map(x => x.trim()).join(separator); + // Process each order group in order (b - a = low to high ; a - b = high to low) + const orders = Object.keys(orderGroups).sort((a, b) => +a - +b); + for (const order of orders) { + const orderPrompts = orderGroups[order]; - if (jointPrompt && jointPrompt.length) { - roleMessages.push({ 'role': role, 'content': jointPrompt, injected: true }); + // Order of priority for roles (most important go lower) + const roles = ['system', 'user', 'assistant']; + for (const role of roles) { + const rolePrompts = orderPrompts + .filter(prompt => prompt.role === role) + .map(x => x.content) + .join(separator); + + // Get extension prompt + const extensionPrompt = await getExtensionPrompt(extension_prompt_types.IN_CHAT, i, separator, roleTypes[role], wrap); + const jointPrompt = [rolePrompts, extensionPrompt].filter(x => x).map(x => x.trim()).join(separator); + + if (jointPrompt && jointPrompt.length) { + roleMessages.push({ 'role': role, 'content': jointPrompt, injected: true }); + } } } @@ -1314,6 +1332,8 @@ async function preparePromptsForChatCompletion({ scenario, charPersonality, name prompt.injection_position = collectionPrompt.injection_position ?? prompt.injection_position; // Depth for In-Chat prompt.injection_depth = collectionPrompt.injection_depth ?? prompt.injection_depth; + // Priority for In-Chat + prompt.injection_order = collectionPrompt.injection_order ?? prompt.injection_order; // Role (system, user, assistant) prompt.role = collectionPrompt.role ?? prompt.role; }