mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
zhconv
This commit is contained in:
parent
4b2cb0e2e4
commit
f2d9473ffe
@ -1,6 +1,6 @@
|
|||||||
from translator.basetranslator import basetrans
|
from translator.basetranslator import basetrans
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json, zhconv
|
||||||
|
|
||||||
# OpenAI
|
# OpenAI
|
||||||
# from openai import OpenAI
|
# from openai import OpenAI
|
||||||
@ -106,6 +106,8 @@ class TS(basetrans):
|
|||||||
content = ""
|
content = ""
|
||||||
|
|
||||||
gpt_dict_raw_text = self.make_gpt_dict_text(gpt_dict)
|
gpt_dict_raw_text = self.make_gpt_dict_text(gpt_dict)
|
||||||
|
if self.needzhconv:
|
||||||
|
gpt_dict_raw_text = zhconv.convert(gpt_dict_raw_text, "zh-tw")
|
||||||
content += "根据以下术语表(可以为空):\n" + gpt_dict_raw_text + "\n\n"
|
content += "根据以下术语表(可以为空):\n" + gpt_dict_raw_text + "\n\n"
|
||||||
|
|
||||||
content += (
|
content += (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user