mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-15 00:43:59 +08:00
fix
This commit is contained in:
parent
1a1d977de5
commit
97c34fd0ce
@ -215,13 +215,12 @@ class TS(basetrans):
|
|||||||
def translate(self, query):
|
def translate(self, query):
|
||||||
if isinstance(query, dict):
|
if isinstance(query, dict):
|
||||||
gpt_dict = query["gpt_dict"]
|
gpt_dict = query["gpt_dict"]
|
||||||
contentraw = query["contentraw"]
|
|
||||||
query = query["text"]
|
|
||||||
if gpt_dict and self.using_gpt_dict:
|
if gpt_dict and self.using_gpt_dict:
|
||||||
query = contentraw
|
query = query["contentraw"]
|
||||||
|
else:
|
||||||
|
query = query["text"]
|
||||||
else:
|
else:
|
||||||
gpt_dict = None
|
gpt_dict = None
|
||||||
contentraw = query
|
|
||||||
self.checkempty(["API接口地址"])
|
self.checkempty(["API接口地址"])
|
||||||
self.get_client(self.config["API接口地址"])
|
self.get_client(self.config["API接口地址"])
|
||||||
frequency_penalty = float(self.config["frequency_penalty"])
|
frequency_penalty = float(self.config["frequency_penalty"])
|
||||||
|
@ -29,7 +29,7 @@ include(generate_product_version)
|
|||||||
|
|
||||||
set(VERSION_MAJOR 5)
|
set(VERSION_MAJOR 5)
|
||||||
set(VERSION_MINOR 53)
|
set(VERSION_MINOR 53)
|
||||||
set(VERSION_PATCH 0)
|
set(VERSION_PATCH 1)
|
||||||
|
|
||||||
add_library(pch pch.cpp)
|
add_library(pch pch.cpp)
|
||||||
target_precompile_headers(pch PUBLIC pch.h)
|
target_precompile_headers(pch PUBLIC pch.h)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user