Files
pingtai_agent/format_police_agent/run_api_server.py
T
2026-02-05 16:01:34 +00:00

20 lines
542 B
Python

#!/usr/bin/env python
"""启动格式警察 Agent API 服务器"""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent))
if __name__ == '__main__':
from src.server.api_server import app
import uvicorn
import os
host = os.getenv('API_HOST', '0.0.0.0')
port = int(os.getenv('API_PORT', '8000'))
print(f"🚔 启动格式警察 Agent API: http://{host}:{port}")
print(f"📋 MCP 端点: http://{host}:{port}/mcp")
uvicorn.run(app, host=host, port=port, log_level="info")