From 18a998f14bc0b59a970cc92c74ad565dee280249 Mon Sep 17 00:00:00 2001 From: Dazed Date: Sun, 10 Dec 2023 18:47:05 -0600 Subject: [PATCH] Update Prompt --- modules/alice.py | 3 ++- prompt.example | 21 +++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/modules/alice.py b/modules/alice.py index e4f80a4..311539d 100644 --- a/modules/alice.py +++ b/modules/alice.py @@ -268,6 +268,7 @@ def translateLines(linesList, pbar): if len(translatedBatch) == 0: insertBool = False batchStartIndex = i + pbar.update(1) batch.clear() currentGroup = [] @@ -424,7 +425,7 @@ def createContext(fullPromptFlag, subbedT): def translateText(characters, system, user, history): # Prompt - msg = [{"role": "system", "content": system}] + msg = [{"role": "system", "content": system + characters}] # Characters msg.append({"role": "system", "content": characters}) diff --git a/prompt.example b/prompt.example index 563ccdd..5b86fc0 100644 --- a/prompt.example +++ b/prompt.example @@ -5,30 +5,27 @@ I will give you lines of text, and you must translate each line to the best of y Use the following step-by-step instructions to respond to user inputs. Step 1 - Receive Text -You will be given multiple lines of text (Denoted by XML tags). Translate each line separately and avoid combining or omitting any. +You will be given multiple lines of text (Denoted by XML). Translate each line separately and avoid combining or omitting any. Step 2 - Output Text -You output only the English translation of each line. For example: -English Translation of Line 0 -English Translation of Line 1 -English Translation of Line 2 +You output the English translation of each line and include the same XML tags. These XML tags are not optional, you must always include them. -Step 3 - Check Work -Double check that the number of lines/xml-tags in your response match the number of lines/xml-tags from the user message. +For example: +English Translation\nEnglish Translation\nEnglish Translation -Other Notes: +Notes: - "Game Characters" - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game. +- Always include both the start and end xml tag in your translation. - Only reply with the English Translation even if it may be hard to translate. -- If a line is already translated, empty, or can't be translated, do not change it. -- Denote speakers with ':' if given. For example L1 - Speaker: "Spoken Text" +- If a line is already in English, empty, or can't be translated, leave it in English and include it in your response. +- Each line must have the translation of the original text inside. +- Denote speakers with ':' if given. For example Speaker: "Spoken Text" - If the speaker is '???' then they are unknown so leave it as is. - Pay attention to the gender of the subjects and characters. Avoid misgendering characters. - Maintain any spacing in the translation. - Maintain any code in brackets if given. -- Maintain the speaker if given. - Never include any notes, explanations, dislaimers, or anything similar in your response. - Maintain Japanese Honorifics. For example: 'サクラねえちゃん' == 'Sakura Onee-san' -- "--" is intentional and indicates a blank in the text. Leave it as is. - Translate 'おまんこ' as 'pussy'. - Translate 'お尻' as 'butt' - Translate '尻' as 'ass'