Skip to content

Commit a0b443b

Browse files
committed
fix session
1 parent c9d85ed commit a0b443b

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/content/docs/blades/tutorials/01-session.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ In Blades, State can essentially be understood as: `map[string]any`
2121

2222
It is used to share data across steps (across Agents): the previous step writes, and the next Agent's Prompt template directly reads it.
2323

24-
> The standalone line "Kratos" in your original text appears to be a mispaste; it is recommended to delete it to avoid confusing readers.
25-
2624
#### Agent: Saving Run Results
2725
In an Agent's configuration, you can use the `WithOutputKey` method to specify which key in the State a particular step's output should be written to.
2826

@@ -158,4 +156,4 @@ func main() {
158156
## Best Practices
159157
- Use stable, readable key names: e.g., `draft`, `suggestions`. For complex projects, consider hierarchical naming: `writing.draft`, `review.suggestions`.
160158
- Avoid stuffing entire conversation history into State: State is better suited for "structured/reusable intermediate outputs". For historical dialogue, consider using model messages or summaries.
161-
- Include session for streaming outputs too: If you want to share state across multiple steps, ensure the entire Run/RunStream executes under the same session.
159+
- Include session for streaming outputs too: If you want to share state across multiple steps, ensure the entire Run/RunStream executes under the same session.

src/content/docs/zh-cn/blades/tutorials/01-session.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ reference: ["https://github.com/go-kratos/blades/tree/main/examples/state","http
2121

2222
它用于跨步骤(跨 Agent)共享数据:上一步写入,下一个 Agent 的 Prompt 模板直接读取。
2323

24-
> 你原文里单独出现的 “Kratos” 一行看起来像误粘贴,建议删掉,避免读者困惑。
25-
2624
#### Agent:保存运行结果
2725
在 Agent 的配置里,可以通过 `WithOutputKey` 方法,指定某个步骤的输出结果要写入 State 里的哪个 key。
2826

0 commit comments

Comments
 (0)