Skip to content

Commit 0499980

Browse files
docs(eino): sync chinese docs from feishu
1 parent c2aa409 commit 0499980

26 files changed

Lines changed: 3167 additions & 550 deletions

content/zh/docs/eino/Cookbook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-02"
3+
date: "2026-03-16"
44
lastmod: ""
55
tags: []
66
title: Cookbook

content/zh/docs/eino/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ eino-ext 支持的多模态输入输出场景,可以查阅 [https://www.cloudw
142142

143143
eino-ext 部分 module 报错 undefined: schema.NewParamsOneOfByOpenAPIV3 等问题,升级报错的 eino-ext module 到最新版本即可。
144144

145-
如果 schema 改造比较复杂,可以使用现有的 OpenAPI 3.0 → JSONSchema 转换工具方法辅助转换。
145+
如果 schema 改造比较复杂,可以参考上面的 Discussion #397,使用其中的 JSONSchema 转换工具方法辅助转换。
146146

147147
# Q: Eino-ext 提供的 ChatModel 有哪些模型是支持 Response API 形式调用嘛?
148148

content/zh/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Collect 和 Transform 两种流式范式,目前只在编排场景有用到。
101101
上面的 Concat message stream 是 Eino 框架自动提供的能力,即使不是 message,是任意的 T,只要满足特定的条件,Eino 框架都会自动去做这个 StreamReader[T] 到 T 的转化,这个条件是:**在编排中,当一个组件的上游输出是 StreamReader[T],但是组件只提供了 T 作为输入的业务接口时,框架会自动将 StreamReader[T] concat 成 T,再输入给这个组件。**
102102

103103
> 💡
104-
> 框架自动将 StreamReader[T] concat 成 T 的过程,可能需要用户提供一个 Concat function。详见 [Eino: 编排的设计理念](/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles) 中关于“合并帧”的章节。
104+
> 框架自动将 StreamReader[T] concat 成 T 的过程,可能需要用户提供一个 Concat function。详见 [Eino: 编排的设计理念](/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles#share-FaVnd9E2foy4fAxtbTqcsgq3n5f) 中关于“合并帧”的章节。
105105
106106
另一方面,考虑一个相反的例子。还是 React Agent,这次是一个更完整的编排示意图:
107107

content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_Ark_Agentkit_Sandbox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-10"
3+
date: "2026-03-16"
44
lastmod: ""
55
tags: []
66
title: Ark Agentkit Sandbox

content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_本地文件系统.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-10"
3+
date: "2026-03-12"
44
lastmod: ""
55
tags: []
66
title: 本地文件系统
@@ -218,6 +218,10 @@ absPath, _ := filepath.Abs("./relative/path")
218218

219219
### 常见问题
220220

221+
**Q: 为什么运行 grep 命令报错 ripgrep (rg) is not installed or not in PATH. Please install it: ****[https://github.com/BurntSushi/ripgrep#installation](https://github.com/BurntSushi/ripgrep#installation)**
222+
223+
local 的 Grep 命令默认依赖** ripgrep **指令,如系统没有预装 ripgrep 则需要通过文档安装 ripgrep
224+
221225
**Q: GrepRaw 支持正则吗?**
222226

223227
支持正则匹配,GrepRaw 底层使用的是 ripgrep 命令做的 Grep 操作

content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-02"
3+
date: "2026-03-12"
44
lastmod: ""
55
tags: []
66
title: FileSystem

content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Skill.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-10"
3+
date: "2026-03-16"
44
lastmod: ""
55
tags: []
66
title: Skill
@@ -50,7 +50,7 @@ type FrontMatter struct {
5050
<tr><td>字段</td><td>类型</td><td>说明</td></tr>
5151
<tr><td><pre>Name</pre></td><td><pre>string</pre></td><td>Skill 的唯一标识符。Agent 通过此名称调用 Skill ,建议使用简短、有意义的名称(如 <pre>pdf-processing</pre>、<pre>web-research</pre>)。对应 SKILL.md 中 frontmatter 的 <pre>name</pre> 字段</td></tr>
5252
<tr><td><pre>Description</pre></td><td><pre>string</pre></td><td>Skill 的功能描述。这是 Agent 判断是否使用该 Skill 的关键依据,应清晰说明技 Skill 能适用的场景和能力。对应 SKILL.md 中 frontmatter 的 <pre>description</pre> 字段</td></tr>
53-
<tr><td><pre>Context</pre></td><td><pre>ContextMode</pre></td><td>上下文模式。可选值:<pre>fork</pre>(复制历史消息创建新 Agent 执行)、<pre>isolate</pre>(隔离上下文创建新 Agent 执行)。留空表示内联模式(直接返回 Skill 内容)</td></tr>
53+
<tr><td><pre>Context</pre></td><td><pre>ContextMode</pre></td><td>上下文模式。可选值:<pre>fork_with_context</pre>(复制历史消息创建新 Agent 执行)、<pre>fork</pre>(隔离上下文创建新 Agent 执行)。留空表示内联模式(直接返回 Skill 内容)</td></tr>
5454
<tr><td><pre>Agent</pre></td><td><pre>string</pre></td><td>指定使用的 Agent 名称。配合 <pre>Context</pre> 字段使用,通过 <pre>AgentHub</pre> 获取对应的 Agent 工厂函数。留空时使用默认 Agent</td></tr>
5555
<tr><td><pre>Model</pre></td><td><pre>string</pre></td><td>指定使用的模型名称。通过 <pre>ModelHub</pre> 获取对应的模型实例。在 Context 模式下传递给 Agent 工厂;在内联模式下切换后续 ChatModel 调用使用的模型</td></tr>
5656
</table>
@@ -59,16 +59,16 @@ type FrontMatter struct {
5959

6060
```go
6161
const (
62-
ContextModeFork ContextMode = "fork" // 复制历史消息
63-
ContextModeIsolate ContextMode = "isolate" // 隔离上下文
62+
ContextModeFork ContextMode = "fork" // 复制历史消息
63+
ContextModeForkWithContext ContextMode = "fork_with_context" // 隔离上下文
6464
)
6565
```
6666

6767
<table>
6868
<tr><td>模式</td><td>说明</td></tr>
6969
<tr><td>内联(默认)</td><td>Skill 内容直接作为工具结果返回,由当前 Agent 继续处理</td></tr>
70-
<tr><td>Fork</td><td>创建新 Agent,复制当前对话历史,独立执行 Skill 任务后返回结果</td></tr>
71-
<tr><td>Isolate</td><td>创建新 Agent,使用隔离的上下文(仅包含 Skill 内容),独立执行后返回结果</td></tr>
70+
<tr><td>ForkWithContext</td><td>创建新 Agent,复制当前对话历史,独立执行 Skill 任务后返回结果</td></tr>
71+
<tr><td>Fork</td><td>创建新 Agent,使用隔离的上下文(仅包含 Skill 内容),独立执行后返回结果</td></tr>
7272
</table>
7373

7474
## Skill
@@ -283,7 +283,7 @@ type Config struct {
283283

284284
# 快速开始
285285

286-
以从本地加载 pdf skill 为例, 完整代码见 [https://github.com/cloudwego/eino-examples/tree/alpha/08/adk/middlewares/skill](https://github.com/cloudwego/eino-examples/tree/alpha/08/adk/middlewares/skill)
286+
以从本地加载 pdf skill 为例, 完整代码见 [https://github.com/cloudwego/eino-examples/tree/main/adk/middlewares/skill](https://github.com/cloudwego/eino-examples/tree/main/adk/middlewares/skill)
287287

288288
- 在工作目录中创建 skills 目录:
289289

@@ -305,20 +305,24 @@ import (
305305
"github.com/cloudwego/eino-ext/adk/backend/local"
306306
)
307307

308+
ctx := context.Background()
308309

309310
be, err := local.NewBackend(ctx, &local.Config{})
310311
if err != nil {
311312
log.Fatal(err)
312313
}
313314

314-
wd, _ := os.Getwd()
315-
workDir := filepath.Join(wd, "adk", "middlewares", "skill", "workdir")
316315
skillBackend, err := skill.NewBackendFromFilesystem(ctx, &skill.BackendFromFilesystemConfig{
317316
Backend: be,
318317
BaseDir: skillsDir,
319318
})
319+
if err != nil {
320+
log.Fatalf("Failed to create skill backend: %v", err)
321+
}
320322

321-
skillMiddleware, err := NewMiddleware(ctx, &Config{Backend: backend})
323+
sm, err := skill.NewMiddleware(ctx, &skill.Config{
324+
Backend: skillBackend,
325+
})
322326
```
323327

324328
- 基于 backend 创建本地 Filesystem Middleware,供 agent 读取 skill 其他文件以及执行脚本:
@@ -329,8 +333,8 @@ import (
329333
)
330334

331335
fsm, err := filesystem.New(ctx, &filesystem.MiddlewareConfig{
332-
Backend: be,
333-
WithoutLargeToolResultOffloading: true,
336+
Backend: be,
337+
StreamingShell: be,
334338
})
335339
```
336340

@@ -342,7 +346,7 @@ agent, err := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{
342346
Description: "An agent that can analyze logs",
343347
Instruction: "You are a helpful assistant.",
344348
Model: cm,
345-
Handlers: []adk.ChatModelAgentMiddleware{fsm, skillMiddleware},
349+
Handlers: []adk.ChatModelAgentMiddleware{fsm, sm},
346350
})
347351
```
348352

@@ -502,4 +506,4 @@ Important:
502506
<a href="/img/eino/GzIObeN6roy2SAxpEXBcMqrRnYb.png" target="_blank"><img src="/img/eino/GzIObeN6roy2SAxpEXBcMqrRnYb.png" width="100%" /></a>
503507

504508
> 💡
505-
> Skill Middleware 仅提供了如上图所示的加载 SKILL.md 能力,如果 Skill 本身需要读取文件、执行脚本等,需要用户另外为 agent 配置相关能力
509+
> Skill Middleware 仅提供了如上图所示的加载 SKILL.md 能力,如果 Skill 需要 agent 具备读取文件、执行脚本等能力,需要用户另外为 agent 配置

content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_ToolReduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-09"
3+
date: "2026-03-12"
44
lastmod: ""
55
tags: []
66
title: Reduction

content/zh/docs/eino/core_modules/eino_adk/adk_agent_callback.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-10"
3+
date: "2026-03-12"
44
lastmod: ""
55
tags: []
66
title: Agent Callback

content/zh/docs/eino/core_modules/eino_adk/agent_implementation/chat_model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Description: ""
3-
date: "2026-03-09"
3+
date: "2026-03-16"
44
lastmod: ""
55
tags: []
66
title: ChatModelAgent

0 commit comments

Comments
 (0)