From 9775b1a0630dce22efc22e410da57dd4edeb6af2 Mon Sep 17 00:00:00 2001 From: milk <53408947@qq.com> Date: Thu, 11 Sep 2025 19:02:00 +0800 Subject: [PATCH 1/3] temp --- .idea/iOSAI.iml | 2 +- .idea/misc.xml | 2 +- .idea/workspace.xml | 3 +-- Module/FlaskService.py | 20 +++++++++++++++++++- Utils/LogManager.py | 2 +- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.idea/iOSAI.iml b/.idea/iOSAI.iml index df5cbff..f571432 100644 --- a/.idea/iOSAI.iml +++ b/.idea/iOSAI.iml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index c27b771..db8786c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8481fb9..3de4e5b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -170,8 +170,7 @@ - diff --git a/Module/FlaskService.py b/Module/FlaskService.py index bd1c41c..942e7ba 100644 --- a/Module/FlaskService.py +++ b/Module/FlaskService.py @@ -357,7 +357,6 @@ def queryAnchorList(): data = [] return ResultData(data=data).toJson() - # 删除主播 @app.route("/deleteAnchorWithIds", methods=['POST']) def deleteAnchorWithIds(): @@ -366,6 +365,25 @@ def deleteAnchorWithIds(): deleted = AiUtils.delete_anchors_by_ids(ids) return ResultData(data={"deleted": deleted}).toJson() +@app.route("/aiConfig", methods=['POST']) +def aiConfig(): + data = request.get_json() + agentName = data.get("agentName") + guildName = data.get("guildName") + contactTool = data.get("contactTool") + contact = data.get("contact") + + dict = { + "agentName": agentName, + "guildName": guildName, + "contactTool": contactTool, + "contact": contact + } + + jsonData = json.dumps(dict) + print(jsonData) + + return ResultData(data="").toJson() if __name__ == '__main__': app.run("0.0.0.0", port=5000, debug=True, use_reloader=False) diff --git a/Utils/LogManager.py b/Utils/LogManager.py index a39050c..67e8a24 100644 --- a/Utils/LogManager.py +++ b/Utils/LogManager.py @@ -240,7 +240,7 @@ def _force_utf8_everywhere(): except Exception: pass -_force_utf8_everywhere() +# _force_utf8_everywhere() # ========= 全局:强制 UTF-8 + 关闭缓冲(运行期立刻生效) ========= From a3019ffee4067ff0f63e09ae37deae3af50eea83 Mon Sep 17 00:00:00 2001 From: milk <53408947@qq.com> Date: Thu, 11 Sep 2025 19:33:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 47 +++++++++++++++++++++--------------------- Module/FlaskService.py | 5 ++--- Utils/Requester.py | 6 ++++++ data/aiConfig.json | 6 ++++++ 4 files changed, 38 insertions(+), 26 deletions(-) create mode 100644 data/aiConfig.json diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3de4e5b..cea6f89 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -46,29 +46,30 @@ - { - "keyToString": { - "ASKED_ADD_EXTERNAL_FILES": "true", - "Python.123.executor": "Run", - "Python.Main.executor": "Run", - "Python.tidevice_entry.executor": "Run", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", - "RunOnceActivity.git.unshallow": "true", - "SHARE_PROJECT_CONFIGURATION_FILES": "true", - "git-widget-placeholder": "main", - "javascript.nodejs.core.library.configured.version": "20.17.0", - "javascript.nodejs.core.library.typings.version": "20.17.58", - "last_opened_file_path": "F:/company code/AI item/20250820/iOSAI", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "settings.editor.selected.configurable": "com.gitee.ui.GiteeSettingsConfigurable", - "vue.rearranger.settings.migration": "true" + +}]]> @@ -90,7 +91,7 @@ - + - + + + + - { + "keyToString": { + "ASKED_ADD_EXTERNAL_FILES": "true", + "Python.12.executor": "Run", + "Python.123.executor": "Run", + "Python.Main.executor": "Run", + "Python.tidevice_entry.executor": "Run", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "git-widget-placeholder": "main", + "javascript.nodejs.core.library.configured.version": "20.17.0", + "javascript.nodejs.core.library.typings.version": "20.17.58", + "last_opened_file_path": "F:/company code/AI item/20250820/iOSAI", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "settings.editor.selected.configurable": "preferences.editor.code.editing", + "vue.rearranger.settings.migration": "true" } -}]]> +} diff --git a/Utils/Requester.py b/Utils/Requester.py index 1eead24..a45dac4 100644 --- a/Utils/Requester.py +++ b/Utils/Requester.py @@ -50,6 +50,12 @@ class Requester(): 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")