From 6efc9aa520842bb2e78bc318f8a7e75df7213d07 Mon Sep 17 00:00:00 2001 From: Dazed Date: Sun, 7 Jan 2024 10:28:06 -0600 Subject: [PATCH] Update prompt --- modules/rpgmakermvmz.py | 14 +++++++++----- prompt.example | 22 ++++++++++++---------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index 6b10571..aa77f45 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -46,7 +46,7 @@ if 'gpt-3.5' in MODEL: elif 'gpt-4' in MODEL: INPUTAPICOST = .01 OUTPUTAPICOST = .03 - BATCHSIZE = 40 + BATCHSIZE = 10 FREQUENCY_PENALTY = 0.1 #tqdm Globals @@ -59,7 +59,7 @@ CODE401 = True CODE405 = False # Choices -CODE102 = True +CODE102 = False # Variables CODE122 = False @@ -1782,8 +1782,8 @@ def getSpeaker(speaker): case 'ルリエル': return ['Ruliel', [0,0]] case _: - return [speaker, [0,0]] - + return translateGPT(speaker, 'Reply with only the '+ LANGUAGE +' translation of the NPC name.', False) + def subVars(jaString): jaString = jaString.replace('\u3000', ' ') @@ -1905,7 +1905,11 @@ def batchList(input_list, batch_size): def createContext(fullPromptFlag, subbedT): characters = 'Game Characters:\n\ -ミオリ (Miori) - Female\n\ +守崎 ユイ (Morisaki Yui) - Female\n\ +ポニーセレス (Pony Celes)) - Female\n\ +天沢 ギンガ (Amasawa Ginga) - Male\n\ +西園寺 カレン (Saionji Karen) - Female\n\ +鮫島 タクミ (Samejima Takumi) - Male\n\ ' system = PROMPT if fullPromptFlag else \ diff --git a/prompt.example b/prompt.example index 5b86fc0..cb21903 100644 --- a/prompt.example +++ b/prompt.example @@ -5,28 +5,30 @@ 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). Translate each line separately and avoid combining or omitting any. +You will be given multiple lines of text (Denoted by XML tags). Translate each line separately and avoid combining or omitting any. Step 2 - Output Text -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. - -For example: -English Translation\nEnglish Translation\nEnglish Translation +You output only the English translation of each line and its speaker. For example: +`Line 0 English Translation` +`Line 1 English Translation` +`Line 2 English Translation` 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 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" +- Make sure you translate the speaker in the line to English. +- All text in the output must be in English even if it may be hard to translate. +- Leave 'Placeholder Text' as is and include it in your response. +- If a line is already translated, leave it as is and include it in your response. +- 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. - Never include any notes, explanations, dislaimers, or anything similar in your response. - Maintain Japanese Honorifics. For example: 'サクラねえちゃん' == 'Sakura Onee-san' -- Translate 'おまんこ' as 'pussy'. +- Translate 'マンコ' as 'pussy' +- Translate 'おまんこ' as 'pussy' - Translate 'お尻' as 'butt' - Translate '尻' as 'ass' - Translate 'お股' as 'crotch'