feat: Agent 服务日志功能和后端更新

- agent/main.py: 添加日志记录功能
- agent/llm: 更新 anthropic, openai, factory
- agent/core/agent.py: 更新
- server: agent_handler, agent_service, chat_service 更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 17:22:40 +08:00
parent f9660a3d7b
commit 25eb277a2a
10 changed files with 260 additions and 25 deletions

View File

@@ -25,6 +25,7 @@ type ChatRequest struct {
AgentID int `json:"agent_id" binding:"required"`
Message string `json:"message" binding:"required"`
SessionID string `json:"session_id"`
ModelID string `json:"model_id"`
}
// ChatResponse 对话响应
@@ -54,6 +55,7 @@ func (h *AgentHandler) Chat(c *gin.Context) {
Message: req.Message,
UserID: userID,
SessionID: req.SessionID,
ModelID: req.ModelID,
}
result, err := h.agentService.Chat(pythonReq)