ProgressThinkChunkEvent 思考块内容事件 统一的思考事件格式,支持各种 LLM 模型的推理输出
| 39 | // ProgressThinkChunkEvent 思考块内容事件 |
| 40 | // 统一的思考事件格式,支持各种 LLM 模型的推理输出 |
| 41 | type ProgressThinkChunkEvent struct { |
| 42 | Step int `json:"step"` |
| 43 | Delta string `json:"delta"` // 增量内容 (流式使用) |
| 44 | ID string `json:"id,omitempty"` // 事件ID |
| 45 | Stage string `json:"stage,omitempty"` // 阶段名称: "任务规划", "推理分析", "工具规划", "结果总结" |
| 46 | Reasoning string `json:"reasoning,omitempty"` // 完整推理内容 (非流式使用) |
| 47 | Decision string `json:"decision,omitempty"` // 决策/结论 |
| 48 | Context any `json:"context,omitempty"` // 上下文信息 |
| 49 | Timestamp string `json:"timestamp,omitempty"` // ISO8601 时间戳 |
| 50 | } |
| 51 | |
| 52 | func (e *ProgressThinkChunkEvent) Channel() AgentChannel { return ChannelProgress } |
| 53 | func (e *ProgressThinkChunkEvent) EventType() string { return "think_chunk" } |
nothing calls this directly
no outgoing calls
no test coverage detected