forked from chenchen/pingtai_agent
23 lines
709 B
Python
23 lines
709 B
Python
#!/usr/bin/env python
|
|
"""启动 Specs 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"🚀 启动 Specs Agent API: http://{host}:{port}")
|
|
print("📋 工作流程:")
|
|
print(" 1. analyze_requirements - 需求分析")
|
|
print(" 2. create_design - 设计规划")
|
|
print(" 3. create_tasks - 任务拆解")
|
|
print(" 4. get_full_spec - 生成完整规范")
|
|
uvicorn.run(app, host=host, port=port, log_level="info")
|