Merge remote-tracking branch 'origin/main'
# Conflicts: # .idea/workspace.xml
This commit is contained in:
@@ -240,7 +240,7 @@ def _force_utf8_everywhere():
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
_force_utf8_everywhere()
|
||||
# _force_utf8_everywhere()
|
||||
|
||||
|
||||
# ========= 全局:强制 UTF-8 + 关闭缓冲(运行期立刻生效) =========
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import requests
|
||||
from Entity.Variables import prologueList
|
||||
from Utils.JsonUtils import JsonUtils
|
||||
from Utils.LogManager import LogManager
|
||||
|
||||
BaseUrl = "https://crawlclient.api.yolozs.com/api/common/"
|
||||
@@ -44,6 +45,17 @@ class Requester():
|
||||
# ai聊天
|
||||
@classmethod
|
||||
def chatToAi(cls, param):
|
||||
aiConfig = JsonUtils.read_json("aiConfig")
|
||||
agentName = aiConfig.get("agentName")
|
||||
guildName = aiConfig.get("guildName")
|
||||
contactTool = aiConfig.get("contactTool", "")
|
||||
contact = aiConfig.get("contact", "")
|
||||
|
||||
param["agentName"] = agentName
|
||||
param["guildName"] = guildName
|
||||
param["contactTool"] = contactTool
|
||||
param["contact"] = contact
|
||||
|
||||
try:
|
||||
url = "https://ai.yolozs.com/chat"
|
||||
result = requests.request(url=url, json=param, method="POST")
|
||||
|
||||
Reference in New Issue
Block a user