feat:新增投顾agent和nl2sqlagent
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
"""命令行检查 NL2SQL 依赖健康状态。"""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
||||
|
||||
from config import database
|
||||
from nl2sql.health import check_nl2sql_health
|
||||
from tool.llm import llm
|
||||
|
||||
|
||||
async def check() -> dict:
|
||||
"""检查 MySQL、Redis、Milvus 和 LLM 首选端点。"""
|
||||
try:
|
||||
return await check_nl2sql_health(
|
||||
{
|
||||
"mysql": database.mysql.check_health,
|
||||
"redis": database.redis.check_health,
|
||||
"milvus": database.milvus.check_health,
|
||||
"llm": llm.check_health,
|
||||
}
|
||||
)
|
||||
finally:
|
||||
await database.dispose()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(asyncio.run(check()))
|
||||
Reference in New Issue
Block a user