feat: 初始化考培练系统项目

- 从服务器拉取完整代码
- 按框架规范整理项目结构
- 配置 Drone CI 测试环境部署
- 包含后端(FastAPI)、前端(Vue3)、管理端

技术栈: Vue3 + TypeScript + FastAPI + MySQL
This commit is contained in:
111
2026-01-24 19:33:28 +08:00
commit 998211c483
1197 changed files with 228429 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
"""Coze客户端临时模拟等Agent-Coze实现后替换"""
import logging
from typing import Dict, Any, Optional
logger = logging.getLogger(__name__)
class CozeClient:
"""
Coze客户端模拟类
TODO: 等Agent-Coze模块实现后这个类将被真实的Coze网关客户端替换
"""
async def create_conversation(
self, bot_id: str, user_id: str, meta_data: Optional[Dict[str, Any]] = None
) -> Dict[str, Any]:
"""创建会话(模拟)"""
logger.info(f"模拟创建Coze会话: bot_id={bot_id}, user_id={user_id}")
# 返回模拟的会话信息
return {
"conversation_id": f"mock_conversation_{user_id}_{bot_id[:8]}",
"bot_id": bot_id,
"status": "active",
}
async def send_message(
self, conversation_id: str, content: str, message_type: str = "text"
) -> Dict[str, Any]:
"""发送消息(模拟)"""
logger.info(f"模拟发送消息到会话 {conversation_id}: {content[:50]}...")
# 返回模拟的消息响应
return {
"message_id": f"mock_msg_{conversation_id[:8]}",
"content": f"这是对'{content[:30]}...'的模拟回复",
"role": "assistant",
}
async def end_conversation(self, conversation_id: str) -> Dict[str, Any]:
"""结束会话(模拟)"""
logger.info(f"模拟结束会话: {conversation_id}")
return {"status": "completed", "conversation_id": conversation_id}