From ae24bdcba2bffce7d95f677dffbf982df3e3a02f Mon Sep 17 00:00:00 2001 From: Dazed Date: Tue, 12 Dec 2023 18:21:44 -0600 Subject: [PATCH] add characters to system --- modules/alice.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/alice.py b/modules/alice.py index e4f80a4..76ebe52 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,16 +425,13 @@ def createContext(fullPromptFlag, subbedT): def translateText(characters, system, user, history): # Prompt - msg = [{"role": "system", "content": system}] - - # Characters - msg.append({"role": "system", "content": characters}) + msg = [{"role": "system", "content": system + characters}] # History if isinstance(history, list): - msg.extend([{"role": "system", "content": h} for h in history]) + msg.extend([{"role": "assistant", "content": h} for h in history]) else: - msg.append({"role": "system", "content": history}) + msg.append({"role": "assistant", "content": history}) # Content to TL msg.append({"role": "user", "content": f'{user}'})