From 33e715a1d0e611ec7fd41a44979afcbc1fd47761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:29:25 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/translator/cohere.py | 2 +- LunaTranslator/LunaTranslator/translator/gptcommon.py | 2 +- LunaTranslator/LunaTranslator/translator/txhunyuan.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/translator/cohere.py b/LunaTranslator/LunaTranslator/translator/cohere.py index 0d85b481..824c8b05 100644 --- a/LunaTranslator/LunaTranslator/translator/cohere.py +++ b/LunaTranslator/LunaTranslator/translator/cohere.py @@ -84,7 +84,7 @@ class TS(basetrans): temperature = 0.3 if self.config["使用自定义promt"]: - message = [{"role": "user", "content": self.config["自定义promt"]}] + message = [{"role": "system", "content": self.config["自定义promt"]}] else: message = [ { diff --git a/LunaTranslator/LunaTranslator/translator/gptcommon.py b/LunaTranslator/LunaTranslator/translator/gptcommon.py index 84ec6a1d..62d21971 100644 --- a/LunaTranslator/LunaTranslator/translator/gptcommon.py +++ b/LunaTranslator/LunaTranslator/translator/gptcommon.py @@ -114,7 +114,7 @@ class gptcommon(basetrans): self.contextnum = int(self.config["附带上下文个数"]) if self.config["使用自定义promt"]: - message = [{"role": "user", "content": self.config["自定义promt"]}] + message = [{"role": "system", "content": self.config["自定义promt"]}] else: message = [ { diff --git a/LunaTranslator/LunaTranslator/translator/txhunyuan.py b/LunaTranslator/LunaTranslator/translator/txhunyuan.py index b262a330..daf546f4 100644 --- a/LunaTranslator/LunaTranslator/translator/txhunyuan.py +++ b/LunaTranslator/LunaTranslator/translator/txhunyuan.py @@ -117,7 +117,7 @@ class TS(basetrans): self.contextnum = int(self.config["context_num"]) if self.config["use_user_prompt"]: - message = [{"Role": "user", "Content": self.config["user_prompt"]}] + message = [{"Role": "system", "Content": self.config["user_prompt"]}] else: message = [ {