临时提交
This commit is contained in:
47
.idea/workspace.xml
generated
47
.idea/workspace.xml
generated
@@ -46,29 +46,30 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"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"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"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"
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="E:\Code\python\iOSAI\resources" />
|
||||
@@ -90,7 +91,7 @@
|
||||
<visibility group="运行配置" flag="true" />
|
||||
</myKeys>
|
||||
</component>
|
||||
<component name="RunManager" selected="Python.12">
|
||||
<component name="RunManager" selected="Python.Main">
|
||||
<configuration name="12" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||
<module name="iOSAI" />
|
||||
<option name="ENV_FILES" value="" />
|
||||
|
||||
@@ -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__':
|
||||
|
||||
@@ -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")
|
||||
|
||||
6
data/aiConfig.json
Normal file
6
data/aiConfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"agentName": "小花",
|
||||
"guildName": "牛逼工会",
|
||||
"contactTool": "line",
|
||||
"contact": "7788990"
|
||||
}
|
||||
Reference in New Issue
Block a user