20250904-初步功能已完成
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import requests
|
||||
from Entity.Variables import prologueList
|
||||
from Utils.LogManager import LogManager
|
||||
|
||||
BaseUrl = "https://crawlclient.api.yolozs.com/api/common/"
|
||||
|
||||
@@ -23,16 +24,19 @@ class Requester():
|
||||
# 翻译
|
||||
@classmethod
|
||||
def translation(cls, msg, country="英国"):
|
||||
parame = {
|
||||
"msg": msg,
|
||||
"country": country,
|
||||
}
|
||||
url = "http://ai.zhukeping.com/translation"
|
||||
result = requests.request(url=url, json=parame, method="POST")
|
||||
json = result.json()
|
||||
data = json.get("data")
|
||||
print(data)
|
||||
return data
|
||||
try:
|
||||
parame = {
|
||||
"msg": msg,
|
||||
"country": country,
|
||||
}
|
||||
url = "http://ai.zhukeping.com/translation"
|
||||
result = requests.request(url=url, json=parame, method="POST")
|
||||
json = result.json()
|
||||
data = json.get("data")
|
||||
print(data)
|
||||
return data
|
||||
except Exception as e:
|
||||
LogManager.method_error(f"翻译失败,报错的原因:{e}","翻译失败")
|
||||
|
||||
# ai聊天
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user