update:server连接api (#747)

* update:server连接manager-api

* update:读取智能体模型配置

* update:添加默认模型的按钮

* update:优化配置读取方式

* update:server兼容manager接口改造

* update:优化私有配置加载

* update:加载私有模型配置
This commit is contained in:
hrz
2025-04-12 17:36:04 +08:00
committed by GitHub
parent c39ad97b8e
commit 5d69ba0796
57 changed files with 1618 additions and 1066 deletions
+4
View File
@@ -7,6 +7,7 @@ from core.utils.util import check_ffmpeg_installed
TAG = __name__
async def wait_for_exit():
"""Windows 和 Linux 兼容的退出监听"""
loop = asyncio.get_running_loop()
@@ -19,10 +20,12 @@ async def wait_for_exit():
# Linux/macOS: 用 signal 监听 Ctrl + C
def stop():
stop_event.set()
loop.add_signal_handler(signal.SIGINT, stop)
loop.add_signal_handler(signal.SIGTERM, stop) # 支持 kill 进程
await stop_event.wait()
async def main():
check_config_file()
check_ffmpeg_installed()
@@ -44,6 +47,7 @@ async def main():
pass
print("服务器已关闭,程序退出。")
if __name__ == "__main__":
try:
asyncio.run(main())