From 97c34fd0ce4d66d936efd04baca64c86a6fc302d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Thu, 31 Oct 2024 02:39:39 +0800 Subject: [PATCH] fix --- src/LunaTranslator/translator/sakura.py | 7 +++---- src/plugins/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/LunaTranslator/translator/sakura.py b/src/LunaTranslator/translator/sakura.py index 09656c2c..9bfac359 100644 --- a/src/LunaTranslator/translator/sakura.py +++ b/src/LunaTranslator/translator/sakura.py @@ -215,13 +215,12 @@ class TS(basetrans): def translate(self, query): if isinstance(query, dict): gpt_dict = query["gpt_dict"] - contentraw = query["contentraw"] - query = query["text"] if gpt_dict and self.using_gpt_dict: - query = contentraw + query = query["contentraw"] + else: + query = query["text"] else: gpt_dict = None - contentraw = query self.checkempty(["API接口地址"]) self.get_client(self.config["API接口地址"]) frequency_penalty = float(self.config["frequency_penalty"]) diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index be3298f8..62222583 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 53) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)