vault backup: 2026-04-29 20:17:22
This commit is contained in:
@@ -324,6 +324,10 @@ for {
|
||||
> - **不要忽略 `event.Err`**——Agent 内部可能静默失败(如工具执行超时)
|
||||
> - **注意 goroutine 安全**——多个消费者同时读取同一个 AsyncIterator 是不安全的
|
||||
|
||||
> [!question] 深入理解事件流消费模式?
|
||||
> 通过 Claude Code Agent 事件流消费的类比加深理解。
|
||||
> -> 参考 [[chapter_02_chatmodelagent_runner_agentevent/async_iterator_consumption|AsyncIterator:事件流的消费方式]]
|
||||
|
||||
## 多轮对话的实现
|
||||
|
||||
本章实现的是简单的多轮对话:用户输入 → 模型回复 → 用户继续输入 → ...
|
||||
|
||||
Reference in New Issue
Block a user