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 @@
-
+
diff --git a/Module/FlaskService.py b/Module/FlaskService.py
index 942e7ba..73c6c60 100644
--- a/Module/FlaskService.py
+++ b/Module/FlaskService.py
@@ -19,6 +19,7 @@ from Utils.ThreadManager import ThreadManager
from script.ScriptManager import ScriptManager
from Entity.Variables import anchorList, prologueList, addModelToAnchorList, removeModelFromAnchorList
import Entity.Variables as ev
+from Utils.JsonUtils import JsonUtils
app = Flask(__name__)
CORS(app)
@@ -380,9 +381,7 @@ def aiConfig():
"contact": contact
}
- jsonData = json.dumps(dict)
- print(jsonData)
-
+ JsonUtils.write_json("aiConfig", dict)
return ResultData(data="").toJson()
if __name__ == '__main__':
diff --git a/Utils/Requester.py b/Utils/Requester.py
index 6545167..1eead24 100644
--- a/Utils/Requester.py
+++ b/Utils/Requester.py
@@ -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,11 @@ 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", "")
try:
url = "https://ai.yolozs.com/chat"
result = requests.request(url=url, json=param, method="POST")
diff --git a/data/aiConfig.json b/data/aiConfig.json
new file mode 100644
index 0000000..07dd0e9
--- /dev/null
+++ b/data/aiConfig.json
@@ -0,0 +1,6 @@
+{
+ "agentName": "小花",
+ "guildName": "牛逼工会",
+ "contactTool": "line",
+ "contact": "7788990"
+}
\ No newline at end of file