临时提交
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="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ASKED_ADD_EXTERNAL_FILES": "true",
|
"ASKED_ADD_EXTERNAL_FILES": "true",
|
||||||
"Python.123.executor": "Run",
|
"Python.12.executor": "Run",
|
||||||
"Python.Main.executor": "Run",
|
"Python.123.executor": "Run",
|
||||||
"Python.tidevice_entry.executor": "Run",
|
"Python.Main.executor": "Run",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"Python.tidevice_entry.executor": "Run",
|
||||||
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"git-widget-placeholder": "main",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"javascript.nodejs.core.library.configured.version": "20.17.0",
|
"git-widget-placeholder": "main",
|
||||||
"javascript.nodejs.core.library.typings.version": "20.17.58",
|
"javascript.nodejs.core.library.configured.version": "20.17.0",
|
||||||
"last_opened_file_path": "F:/company code/AI item/20250820/iOSAI",
|
"javascript.nodejs.core.library.typings.version": "20.17.58",
|
||||||
"node.js.detected.package.eslint": "true",
|
"last_opened_file_path": "F:/company code/AI item/20250820/iOSAI",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"settings.editor.selected.configurable": "com.gitee.ui.GiteeSettingsConfigurable",
|
"nodejs_package_manager_path": "npm",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"settings.editor.selected.configurable": "preferences.editor.code.editing",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}</component>
|
}]]></component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="MoveFile.RECENT_KEYS">
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
<recent name="E:\Code\python\iOSAI\resources" />
|
<recent name="E:\Code\python\iOSAI\resources" />
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
<visibility group="运行配置" flag="true" />
|
<visibility group="运行配置" flag="true" />
|
||||||
</myKeys>
|
</myKeys>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="Python.12">
|
<component name="RunManager" selected="Python.Main">
|
||||||
<configuration name="12" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
<configuration name="12" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
|
||||||
<module name="iOSAI" />
|
<module name="iOSAI" />
|
||||||
<option name="ENV_FILES" value="" />
|
<option name="ENV_FILES" value="" />
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ from Utils.ThreadManager import ThreadManager
|
|||||||
from script.ScriptManager import ScriptManager
|
from script.ScriptManager import ScriptManager
|
||||||
from Entity.Variables import anchorList, prologueList, addModelToAnchorList, removeModelFromAnchorList
|
from Entity.Variables import anchorList, prologueList, addModelToAnchorList, removeModelFromAnchorList
|
||||||
import Entity.Variables as ev
|
import Entity.Variables as ev
|
||||||
|
from Utils.JsonUtils import JsonUtils
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
CORS(app)
|
CORS(app)
|
||||||
@@ -380,9 +381,7 @@ def aiConfig():
|
|||||||
"contact": contact
|
"contact": contact
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonData = json.dumps(dict)
|
JsonUtils.write_json("aiConfig", dict)
|
||||||
print(jsonData)
|
|
||||||
|
|
||||||
return ResultData(data="").toJson()
|
return ResultData(data="").toJson()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import requests
|
import requests
|
||||||
from Entity.Variables import prologueList
|
from Entity.Variables import prologueList
|
||||||
|
from Utils.JsonUtils import JsonUtils
|
||||||
from Utils.LogManager import LogManager
|
from Utils.LogManager import LogManager
|
||||||
|
|
||||||
BaseUrl = "https://crawlclient.api.yolozs.com/api/common/"
|
BaseUrl = "https://crawlclient.api.yolozs.com/api/common/"
|
||||||
@@ -44,6 +45,11 @@ class Requester():
|
|||||||
# ai聊天
|
# ai聊天
|
||||||
@classmethod
|
@classmethod
|
||||||
def chatToAi(cls, param):
|
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:
|
try:
|
||||||
url = "https://ai.yolozs.com/chat"
|
url = "https://ai.yolozs.com/chat"
|
||||||
result = requests.request(url=url, json=param, method="POST")
|
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