diff --git a/content/en/docs/eino/Eino: Cookbook.md b/content/en/docs/eino/Cookbook.md similarity index 99% rename from content/en/docs/eino/Eino: Cookbook.md rename to content/en/docs/eino/Cookbook.md index a475db0cd73..8b568409b4e 100644 --- a/content/en/docs/eino/Eino: Cookbook.md +++ b/content/en/docs/eino/Cookbook.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-02" lastmod: "" tags: [] -title: 'Eino: Cookbook' +title: Cookbook weight: 3 --- diff --git a/content/en/docs/eino/FAQ.md b/content/en/docs/eino/FAQ.md index ebe0ab2b237..d75225d43f8 100644 --- a/content/en/docs/eino/FAQ.md +++ b/content/en/docs/eino/FAQ.md @@ -142,15 +142,12 @@ According to the previous community announcement plan [Migration from OpenAPI 3. For errors like undefined: schema.NewParamsOneOfByOpenAPIV3 in some eino-ext modules, upgrade the error-reporting eino-ext module to the latest version. -If schema transformation is complex, you can use the tool methods in the [JSONSchema Conversion Methods](https://bytedance.larkoffice.com/wiki/ZMaawoQC4iIjNykzahwc6YOknXf) document to assist with conversion. +If schema transformation is complex, you can use existing OpenAPI 3.0 → JSONSchema conversion tools to assist with conversion. # Q: Which models provided by Eino-ext ChatModel support Response API format calls? - Currently in Eino-Ext, only ARK's Chat Model can create ResponsesAPI ChatModel through **NewResponsesAPIChatModel**. Other models currently do not support ResponsesAPI creation and usage. -- In Eino-byted-ext, only bytedgpt supports creating Response API through **NewResponsesAPIChatModel**. Other chatmodels have not implemented Response API Client. - - Version components/model/gemini/v0.1.16 already supports thought_signature passback. Check if the gemini version meets requirements. If using bytedgemini (code.byted.org/flow/eino-byted-ext/components/model/bytedgemini) chatmodel implementation, check if its dependent components/model/gemini is the latest version, or directly use go get to upgrade gemini. - - Replace the currently used bytedgpt package with the implementation from [code.byted.org/flow/eino-byted-ext/components/model/bytedgemini](http://code.byted.org/flow/eino-byted-ext/components/model/bytedgemini) and upgrade to the latest version. Refer to example code to confirm how to pass BaseURL. - - If you encounter this error, confirm whether the base url filled in when generating chat model is the chat completion URL or the ResponseAPI URL. In most cases, the Response API Base URL was incorrectly passed. + - If you encounter this error, confirm whether the base URL you used to create the chat model is the Chat Completions URL or the Responses API URL. In most cases, an incorrect Responses API base URL was passed. # Q: How to troubleshoot ChatModel call errors? For example, [NodeRunError] failed to create chat completion: error, status code: 400, status: 400 Bad Request. @@ -175,35 +172,3 @@ Use the `GraphCompileCallback` mechanism to export the topology structure during - For obtaining intermediate structures in Flow/React Agent scenarios, refer to the document [Eino: ReAct Agent Manual](/docs/eino/core_modules/flow_integration_components/react_agent_manual) # Q: Gemini model error missing a `thought_signature` - -Gemini model protocol is not openai-compatible. Use the gemini wrapper [https://github.com/cloudwego/eino-ext/tree/main/components/model/gemini](https://github.com/cloudwego/eino-ext/tree/main/components/model/gemini). If using ModelHub platform models, use the internal gemini wrapper [https://code.byted.org/flow/eino-byted-ext/tree/master/components/model/bytedgemini](https://code.byted.org/flow/eino-byted-ext/tree/master/components/model/bytedgemini). Initialization reference code: - -``` -cm, err := bytedgemini.NewChatModel(ctx, &bytedgemini.Config{ - ClientConfig: genai.ClientConfig{ - APIKey: apiKey, - Backend: genai.BackendGeminiAPI, - // uncomment if you want to print the actual request in CURL format - // HTTPClient: &http.Client{Transport: NewCurlLogger(http.DefaultTransport, log.Printf)}, - HTTPOptions: genai.HTTPOptions{ - // this is base URL for cn, other regions: - // - sg: gpt-i18n.byteintl.net - // - sg from office network: genai-sg-og.tiktok-row.org - // - va: search-va.byteintl.net - // - va from office network: genai-va-og.tiktok-row.org - // - Non-TT: gpt-i18n.bd.byteintl.net - // - US-TTP: gpt.tiktokd.net - // - EU-TTP, GCP: gpt.tiktoke.org - // - JP: gpt-jp.byteintl.net - // see also: https://bytedance.larkoffice.com/wiki/wikcnUPXCY2idGyg2AXKPvay4pd - BaseURL: "https://search.bytedance.net/gpt/openapi/online/multimodal/crawl/google/", - APIVersion: "v1", - }, - }, - Model: modelName, - ThinkingConfig: &genai.ThinkingConfig{ - IncludeThoughts: true, - ThinkingBudget: nil, - }, -}) -``` diff --git a/content/en/docs/eino/core_modules/components/chat_model_guide.md b/content/en/docs/eino/core_modules/components/chat_model_guide.md index 709e8f47505..ba11d9c4853 100644 --- a/content/en/docs/eino/core_modules/components/chat_model_guide.md +++ b/content/en/docs/eino/core_modules/components/chat_model_guide.md @@ -336,9 +336,9 @@ result, err := runnable.Invoke(ctx, messages, compose.WithCallbacks(helper)) ## **Existing Implementations** -1. OpenAI ChatModel: Using OpenAI's GPT series models [ChatModel - OpenAI](https://bytedance.larkoffice.com/wiki/NguEw85n6iJjShkVtdQcHpydnld) -2. Ollama ChatModel: Using Ollama local models [ChatModel - Ollama](https://bytedance.larkoffice.com/wiki/WWngw1XMViwgyYkNuZgcjZnxnke) -3. ARK ChatModel: Using ARK platform model services [ChatModel - ARK](https://bytedance.larkoffice.com/wiki/WUzzwaX8ricGwZk1i1mcJHHNnEl) +1. OpenAI ChatModel: Using OpenAI's GPT series models [ChatModel - OpenAI](https://github.com/cloudwego/eino-ext/blob/main/components/model/openai/README.md) +2. Ollama ChatModel: Using Ollama local models [ChatModel - Ollama](https://github.com/cloudwego/eino-ext/blob/main/components/model/ollama/README.md) +3. ARK ChatModel: Using ARK platform model services [ChatModel - ARK](https://github.com/cloudwego/eino-ext/blob/main/components/model/ark/README.md) 4. More: [Eino ChatModel](https://www.cloudwego.io/docs/eino/ecosystem_integration/chat_model/) ## Implementation Reference diff --git a/content/en/docs/eino/ecosystem_integration/_index.md b/content/en/docs/eino/ecosystem_integration/_index.md index 27b0baf8f62..fd408ba5e13 100644 --- a/content/en/docs/eino/ecosystem_integration/_index.md +++ b/content/en/docs/eino/ecosystem_integration/_index.md @@ -11,9 +11,9 @@ weight: 6 ### ChatModel -- openai: [ChatModel - OpenAI](https://bytedance.larkoffice.com/wiki/NguEw85n6iJjShkVtdQcHpydnld) -- ark: [ChatModel - ARK](https://bytedance.larkoffice.com/wiki/WUzzwaX8ricGwZk1i1mcJHHNnEl) -- ollama: [ChatModel - Ollama](https://bytedance.larkoffice.com/wiki/WWngw1XMViwgyYkNuZgcjZnxnke) +- openai: [ChatModel - OpenAI](https://github.com/cloudwego/eino-ext/blob/main/components/model/openai/README.md) +- ark: [ChatModel - ARK](https://github.com/cloudwego/eino-ext/blob/main/components/model/ark/README.md) +- ollama: [ChatModel - Ollama](https://github.com/cloudwego/eino-ext/blob/main/components/model/ollama/README.md) ### Document diff --git a/content/en/docs/eino/overview/_index.md b/content/en/docs/eino/overview/_index.md index 1f573d65c70..452d7af88d5 100644 --- a/content/en/docs/eino/overview/_index.md +++ b/content/en/docs/eino/overview/_index.md @@ -344,13 +344,6 @@ The Eino framework consists of several parts: - [Eino](https://github.com/cloudwego/eino): Contains type definitions, stream data processing mechanisms, component abstraction definitions, orchestration functionality, callback mechanisms, etc. - [EinoExt](https://github.com/cloudwego/eino-ext): Component implementations, callback handler implementations, component usage examples, and various tools such as evaluators, prompt optimizers, etc. -> 💡 -> For components used internally at ByteDance, there are corresponding internal code repositories: -> -> EinoBytedExt: [https://code.byted.org/flow/eino-byted-ext](https://code.byted.org/flow/eino-byted-ext) -> -> Contains component implementations currently positioned for internal use, such as llmgateway, bytedgpt, fornax tracing, bytees, etc. - - [Eino Devops](https://github.com/cloudwego/eino-ext/tree/main/devops): Visual development, visual debugging, etc. - [EinoExamples](https://github.com/cloudwego/eino-examples): A code repository containing example applications and best practices. diff --git a/content/en/docs/eino/quick_start/simple_llm_application.md b/content/en/docs/eino/quick_start/simple_llm_application.md index 34d3556f1bb..219c8c1a97c 100644 --- a/content/en/docs/eino/quick_start/simple_llm_application.md +++ b/content/en/docs/eino/quick_start/simple_llm_application.md @@ -120,7 +120,7 @@ chatModel, err := openai.NewChatModel(ctx, &openai.ChatModelConfig{ }) ``` -> For detailed information about OpenAI ChatModel, see: [ChatModel - OpenAI](https://bytedance.larkoffice.com/wiki/NguEw85n6iJjShkVtdQcHpydnld) +> For detailed information about OpenAI ChatModel, see: [ChatModel - OpenAI](https://github.com/cloudwego/eino-ext/blob/main/components/model/openai/README.md) #### **Ollama (choose either this or OpenAI above)** @@ -140,7 +140,7 @@ chatModel, err := ollama.NewChatModel(ctx, &ollama.ChatModelConfig{ }) ``` -> For Ollama related information, see: [ChatModel - Ollama](https://bytedance.larkoffice.com/wiki/WWngw1XMViwgyYkNuZgcjZnxnke) +> For detailed information about Ollama ChatModel, see: [ChatModel - Ollama](https://github.com/cloudwego/eino-ext/blob/main/components/model/ollama/README.md) Eino provides a unified ChatModel abstraction for large models and offers ready-to-use implementations of various LLMs. Therefore, business code can focus on writing business logic without worrying about model implementation details. When model implementations are updated, they won't affect core business logic, meaning developers can easily switch between different models without modifying large amounts of code. diff --git a/content/en/docs/eino/release_notes_and_migration/Eino_v0.8._-adk_middlewares/Eino_v0.8_Breaking_Changes.md b/content/en/docs/eino/release_notes_and_migration/Eino_v0.8._-adk_middlewares/Eino_v0.8_Breaking_Changes.md index fc3acfa0ba2..e00ac16fbe2 100644 --- a/content/en/docs/eino/release_notes_and_migration/Eino_v0.8._-adk_middlewares/Eino_v0.8_Breaking_Changes.md +++ b/content/en/docs/eino/release_notes_and_migration/Eino_v0.8._-adk_middlewares/Eino_v0.8_Breaking_Changes.md @@ -1,19 +1,17 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-10" lastmod: "" tags: [] title: Eino v0.8 Breaking Changes weight: 1 --- -> This document records all breaking changes in the `v0.8.0.Beta` branch compared to the `main` branch. - ## 1. API Breaking Changes ### 1.1 filesystem Shell Interface Renamed -**Location**: `adk/filesystem/backend.go` **Change Description**: Shell-related interfaces have been renamed and no longer embed the `Backend` interface. **Before (main)**: +**Location**: `adk/filesystem/backend.go` **Change Description**: Shell-related interfaces have been renamed and no longer embed the `Backend` interface. **Before (v0.7.x)**: ```go type ShellBackend interface { @@ -27,7 +25,7 @@ type StreamingShellBackend interface { } ``` -**After (v0.8.0.Beta)**: +**After (v0.8.0)**: ```go type Shell interface { @@ -64,11 +62,11 @@ func (s *MyShell) Execute(...) {...} ### 2.1 AgentEvent Sending Mechanism Change -**Location**: `adk/chatmodel.go` **Change Description**: `ChatModelAgent`'s `AgentEvent` sending mechanism changed from eino callback mechanism to Middleware mechanism. **Before (main)**: +**Location**: `adk/chatmodel.go` **Change Description**: `ChatModelAgent`'s `AgentEvent` sending mechanism changed from eino callback mechanism to Middleware mechanism. **Before (v0.7.x)**: - `AgentEvent` was sent through eino's callback mechanism - If users customized ChatModel or Tool Decorator/Wrapper, and the original ChatModel/Tool had embedded Callback points, `AgentEvent` would be sent **inside** the Decorator/Wrapper -- This applied to all ChatModels implemented in eino-ext, but may not apply to most user-implemented Tools and Tools provided by eino **After (v0.8.0.Beta)**: +- This applied to all ChatModels implemented in eino-ext, but may not apply to most user-implemented Tools and Tools provided by eino **After (v0.8.0)**: - `AgentEvent` is sent through Middleware mechanism - `AgentEvent` is sent **outside** user-customized Decorator/Wrapper **Impact**: - Under normal circumstances, users won't notice this change @@ -99,7 +97,7 @@ func (m *MyMiddleware) WrapModel(ctx context.Context, chatModel model.BaseChatMo ### 2.2 filesystem.ReadRequest.Offset Semantic Change -**Location**: `adk/filesystem/backend.go` **Change Description**: `Offset` field changed from 0-based to 1-based. **Before (main)**: +**Location**: `adk/filesystem/backend.go` **Change Description**: `Offset` field changed from 0-based to 1-based. **Before (v0.7.x)**: ```go type ReadRequest struct { @@ -110,7 +108,7 @@ type ReadRequest struct { } ``` -**After (v0.8.0.Beta)**: +**After (v0.8.0)**: ```go type ReadRequest struct { @@ -140,7 +138,7 @@ req := &ReadRequest{Offset: 1, Limit: 100} ### 2.3 filesystem.FileInfo.Path Semantic Change -**Location**: `adk/filesystem/backend.go` **Change Description**: `FileInfo.Path` field is no longer guaranteed to be an absolute path. **Before (main)**: +**Location**: `adk/filesystem/backend.go` **Change Description**: `FileInfo.Path` field is no longer guaranteed to be an absolute path. **Before (v0.7.x)**: ```go type FileInfo struct { @@ -149,7 +147,7 @@ type FileInfo struct { } ``` -**After (v0.8.0.Beta)**: +**After (v0.8.0)**: ```go type FileInfo struct { @@ -169,14 +167,14 @@ type FileInfo struct { ### 2.4 filesystem.WriteRequest Behavior Change -**Location**: `adk/filesystem/backend.go` **Change Description**: `WriteRequest` write behavior changed from "error if file exists" to "overwrite if file exists". **Before (main)**: +**Location**: `adk/filesystem/backend.go` **Change Description**: `WriteRequest` write behavior changed from "error if file exists" to "overwrite if file exists". **Before (v0.7.x)**: ```go // WriteRequest comment: // The file will be created if it does not exist, or error if file exists. ``` -**After (v0.8.0.Beta)**: +**After (v0.8.0)**: ```go // WriteRequest comment: @@ -193,14 +191,14 @@ type FileInfo struct { ### 2.5 GrepRequest.Pattern Semantic Change -**Location**: `adk/filesystem/backend.go` **Change Description**: `GrepRequest.Pattern` changed from literal matching to regular expression matching. **Before (main)**: +**Location**: `adk/filesystem/backend.go` **Change Description**: `GrepRequest.Pattern` changed from literal matching to regular expression matching. **Before (v0.7.x)**: ```go // Pattern is the literal string to search for. This is not a regular expression. // The search performs an exact substring match within the file's content. ``` -**After (v0.8.0.Beta)**: +**After (v0.8.0)**: ```go // Pattern is the search pattern, supports full regular expression syntax. diff --git a/content/en/docs/eino/release_notes_and_migration/v02_second_release.md b/content/en/docs/eino/release_notes_and_migration/v02_second_release.md index 33d390c5f97..e2f407a6dc0 100644 --- a/content/en/docs/eino/release_notes_and_migration/v02_second_release.md +++ b/content/en/docs/eino/release_notes_and_migration/v02_second_release.md @@ -74,7 +74,7 @@ weight: 2 ### BugFix -- Fixed the SSTI vulnerability in the Jinja chat template [langchaingo has gonja template injection vulnerability](https://bytedance.larkoffice.com/docx/UvqxdlFfSoTIr1xtsQ5cIZTVn2b) +- Fixed the SSTI vulnerability in the Jinja chat template(langchaingo gonja template injection) ## v0.2.0 diff --git a/content/zh/docs/eino/Eino: Cookbook.md b/content/zh/docs/eino/Cookbook.md similarity index 99% rename from content/zh/docs/eino/Eino: Cookbook.md rename to content/zh/docs/eino/Cookbook.md index 9d04a0e78d2..d8268d94759 100644 --- a/content/zh/docs/eino/Eino: Cookbook.md +++ b/content/zh/docs/eino/Cookbook.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-02" lastmod: "" tags: [] -title: 'Eino: Cookbook' +title: Cookbook weight: 3 --- diff --git a/content/zh/docs/eino/FAQ.md b/content/zh/docs/eino/FAQ.md index 95d4cb92b23..d062f4d4b96 100644 --- a/content/zh/docs/eino/FAQ.md +++ b/content/zh/docs/eino/FAQ.md @@ -142,13 +142,12 @@ eino-ext 支持的多模态输入输出场景,可以查阅 [https://www.cloudw eino-ext 部分 module 报错 undefined: schema.NewParamsOneOfByOpenAPIV3 等问题,升级报错的 eino-ext module 到最新版本即可。 -如果 schema 改造比较复杂,可以使用 [JSONSchema 转换方法](https://bytedance.larkoffice.com/wiki/ZMaawoQC4iIjNykzahwc6YOknXf)文档中的工具方法辅助转换。 +如果 schema 改造比较复杂,可以使用现有的 OpenAPI 3.0 → JSONSchema 转换工具方法辅助转换。 # Q: Eino-ext 提供的 ChatModel 有哪些模型是支持 Response API 形式调用嘛? - Eino-Ext 中目前只有 ARK 的 Chat Model 可通过 **NewResponsesAPIChatModel **创建 ResponsesAPI ChatModel,其他模型目前不支持 ResponsesAPI 的创建与使用, -- Eino-byted-ext 中 只有 bytedgpt 支持创建 Response API 通过 **NewResponsesAPIChatModel 创建, **其他 chatmodel 没有实现 Response API Client - - 版本 components/model/gemini/v0.1.16 已经支持 thought_signature 回传,检查 gemini 版本是否符合,如果使用的是 bytedgemini (code.byted.org/flow/eino-byted-ext/components/model/bytedgemini) 的 chatmodel 实现,请检查其依赖的 components/model/gemini 是否为最新版本,或者直接 go get 升级 gemini - 将目前使用的 bytedgpt 的包换成使用 [code.byted.org/flow/eino-byted-ext/components/model/bytedgemini](http://code.byted.org/flow/eino-byted-ext/components/model/bytedgemini) 这个包的实现,并升级到最新版本,查看示例代码 确认 BaseURL 如何传递 。 - 遇到这个报错请确认咱们生成 chat model 是填写的 base url 是 chat completion 的 URL 还是 ResponseAPI 的 URL,绝大多数场景是错误传递了 Response API 的 Base URL + - 遇到这个报错请确认咱们生成 chat model 是填写的 base url 是 chat completion 的 URL 还是 ResponseAPI 的 URL,绝大多数场景是错误传递了 Response API 的 Base URL # Q: 如何排查 ChatModel 调用报错?比如[NodeRunError] failed to create chat completion: error, status code: 400, status: 400 Bad Request。 @@ -173,35 +172,3 @@ ChatModel 产生的 Tool Call 中,Argument 字段是 string。Eino 框架在 - Flow/React Agent 场景下获取中间结构参考文档 [Eino: ReAct Agent 使用手册](/zh/docs/eino/core_modules/flow_integration_components/react_agent_manual) # Q: Gemini 模型报错 missing a `thought_signature` - -Gemini 模型协议不是 openai-compatible,应使用 gemini 封装 [https://github.com/cloudwego/eino-ext/tree/main/components/model/gemini](https://github.com/cloudwego/eino-ext/tree/main/components/model/gemini), 如果使用 ModelHub 平台的模型,使用内场 gemini 封装 [https://code.byted.org/flow/eino-byted-ext/tree/master/components/model/bytedgemini](https://code.byted.org/flow/eino-byted-ext/tree/master/components/model/bytedgemini),初始化参考代码: - -``` -cm, err := bytedgemini.NewChatModel(ctx, &bytedgemini.Config{ - ClientConfig: genai.ClientConfig{ - APIKey: apiKey, - Backend: genai.BackendGeminiAPI, - // uncomment if you want to print the actual request in CURL format - // HTTPClient: &http.Client{Transport: NewCurlLogger(http.DefaultTransport, log.Printf)}, - HTTPOptions: genai.HTTPOptions{ - // this is base URL for cn, other regions: - // - sg: gpt-i18n.byteintl.net - // - sg from office network: genai-sg-og.tiktok-row.org - // - va: search-va.byteintl.net - // - va from office network: genai-va-og.tiktok-row.org - // - Non-TT: gpt-i18n.bd.byteintl.net - // - US-TTP: gpt.tiktokd.net - // - EU-TTP, GCP: gpt.tiktoke.org - // - JP: gpt-jp.byteintl.net - // see also: https://bytedance.larkoffice.com/wiki/wikcnUPXCY2idGyg2AXKPvay4pd - BaseURL: "https://search.bytedance.net/gpt/openapi/online/multimodal/crawl/google/", - APIVersion: "v1", - }, - }, - Model: modelName, - ThinkingConfig: &genai.ThinkingConfig{ - IncludeThoughts: true, - ThinkingBudget: nil, - }, -}) -``` diff --git a/content/zh/docs/eino/core_modules/_index.md b/content/zh/docs/eino/core_modules/_index.md index 808a558f844..6f6a3750d93 100644 --- a/content/zh/docs/eino/core_modules/_index.md +++ b/content/zh/docs/eino/core_modules/_index.md @@ -3,7 +3,7 @@ Description: "" date: "2025-07-21" lastmod: "" tags: [] -title: 'Eino: 核心模块' +title: 核心模块 weight: 4 --- diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/_index.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/_index.md index 5c94ffdd3ef..c4a4520bf95 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/_index.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/_index.md @@ -3,7 +3,7 @@ Description: "" date: "2025-07-21" lastmod: "" tags: [] -title: 'Eino: Chain & Graph & Workflow 编排功能' +title: Chain & Graph & Workflow 编排功能 weight: 2 --- diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities.md index e9bf87d0f7e..c79454c0d75 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities.md @@ -3,7 +3,7 @@ Description: "" date: "2025-11-20" lastmod: "" tags: [] -title: 'Eino: CallOption 能力与规范' +title: CallOption 能力与规范 weight: 6 --- diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual.md index 7545799e8e1..4ee4d46d70c 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-02" lastmod: "" tags: [] -title: 'Eino: Callback 用户手册' +title: Callback 用户手册 weight: 5 --- diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/chain_graph_introduction.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/chain_graph_introduction.md index ad94ec45345..24d85dba27c 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/chain_graph_introduction.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/chain_graph_introduction.md @@ -3,7 +3,7 @@ Description: "" date: "2026-01-20" lastmod: "" tags: [] -title: 'Eino: Chain/Graph 编排介绍' +title: Chain/Graph 编排介绍 weight: 1 --- diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/checkpoint_interrupt.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/checkpoint_interrupt.md index 20df224340f..e32e898bc9b 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/checkpoint_interrupt.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/checkpoint_interrupt.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-02" lastmod: "" tags: [] -title: 'Eino: Interrupt & CheckPoint使用手册' +title: Interrupt & CheckPoint使用手册 weight: 7 --- diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles.md index da6890f3d58..731c634fbdf 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles.md @@ -1,9 +1,9 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-09" lastmod: "" tags: [] -title: 'Eino: 编排的设计理念' +title: 编排的设计理念 weight: 2 --- diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials.md index 9c7025c0804..39ef62359a2 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials.md @@ -101,7 +101,7 @@ Collect 和 Transform 两种流式范式,目前只在编排场景有用到。 上面的 Concat message stream 是 Eino 框架自动提供的能力,即使不是 message,是任意的 T,只要满足特定的条件,Eino 框架都会自动去做这个 StreamReader[T] 到 T 的转化,这个条件是:**在编排中,当一个组件的上游输出是 StreamReader[T],但是组件只提供了 T 作为输入的业务接口时,框架会自动将 StreamReader[T] concat 成 T,再输入给这个组件。** > 💡 -> 框架自动将 StreamReader[T] concat 成 T 的过程,可能需要用户提供一个 Concat function。详见 [Eino: 编排的设计理念](/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles#share-FaVnd9E2foy4fAxtbTqcsgq3n5f) 中关于“合并帧”的章节。 +> 框架自动将 StreamReader[T] concat 成 T 的过程,可能需要用户提供一个 Concat function。详见 [Eino: 编排的设计理念](/zh/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles) 中关于“合并帧”的章节。 另一方面,考虑一个相反的例子。还是 React Agent,这次是一个更完整的编排示意图: diff --git a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/workflow_orchestration_framework.md b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/workflow_orchestration_framework.md index 8d00247d6b1..6aac5ca386b 100644 --- a/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/workflow_orchestration_framework.md +++ b/content/zh/docs/eino/core_modules/chain_and_graph_orchestration/workflow_orchestration_framework.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-02" lastmod: "" tags: [] -title: 'Eino: Workflow 编排框架' +title: Workflow 编排框架 weight: 3 --- diff --git a/content/zh/docs/eino/core_modules/components/_index.md b/content/zh/docs/eino/core_modules/components/_index.md index 23524f2fdc1..2ca96d2a634 100644 --- a/content/zh/docs/eino/core_modules/components/_index.md +++ b/content/zh/docs/eino/core_modules/components/_index.md @@ -3,7 +3,7 @@ Description: "" date: "2026-01-20" lastmod: "" tags: [] -title: 'Eino: Components 组件' +title: Components 组件 weight: 1 --- diff --git a/content/zh/docs/eino/core_modules/components/agentic_chat_model_guide.md b/content/zh/docs/eino/core_modules/components/agentic_chat_model_guide.md index 897a01f848c..55b36bf4cbc 100644 --- a/content/zh/docs/eino/core_modules/components/agentic_chat_model_guide.md +++ b/content/zh/docs/eino/core_modules/components/agentic_chat_model_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-03" lastmod: "" tags: [] -title: 'Eino: AgenticModel 使用说明[Beta]' +title: AgenticModel 使用说明[Beta] weight: 10 --- diff --git a/content/zh/docs/eino/core_modules/components/agentic_chat_template_guide.md b/content/zh/docs/eino/core_modules/components/agentic_chat_template_guide.md index a76710adf60..6c57ec69a44 100644 --- a/content/zh/docs/eino/core_modules/components/agentic_chat_template_guide.md +++ b/content/zh/docs/eino/core_modules/components/agentic_chat_template_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-03" lastmod: "" tags: [] -title: 'Eino: AgenticChatTemplate 使用说明[Beta]' +title: AgenticChatTemplate 使用说明[Beta] weight: 11 --- diff --git a/content/zh/docs/eino/core_modules/components/agentic_tools_node_guide.md b/content/zh/docs/eino/core_modules/components/agentic_tools_node_guide.md index e25b547019f..67f1559297a 100644 --- a/content/zh/docs/eino/core_modules/components/agentic_tools_node_guide.md +++ b/content/zh/docs/eino/core_modules/components/agentic_tools_node_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-03" lastmod: "" tags: [] -title: 'Eino: AgenticToolsNode&Tool 使用说明[Beta]' +title: AgenticToolsNode&Tool 使用说明[Beta] weight: 12 --- diff --git a/content/zh/docs/eino/core_modules/components/chat_model_guide.md b/content/zh/docs/eino/core_modules/components/chat_model_guide.md index b2f16b490ce..83df1c2b9fb 100644 --- a/content/zh/docs/eino/core_modules/components/chat_model_guide.md +++ b/content/zh/docs/eino/core_modules/components/chat_model_guide.md @@ -1,9 +1,9 @@ --- Description: "" -date: "2026-01-20" +date: "2026-03-09" lastmod: "" tags: [] -title: 'Eino: ChatModel 使用说明' +title: ChatModel 使用说明 weight: 8 --- @@ -336,10 +336,7 @@ result, err := runnable.Invoke(ctx, messages, compose.WithCallbacks(helper)) ## **已有实现** -1. OpenAI ChatModel: 使用 OpenAI 的 GPT 系列模型 [ChatModel - OpenAI](https://bytedance.larkoffice.com/wiki/NguEw85n6iJjShkVtdQcHpydnld) -2. Ollama ChatModel: 使用 Ollama 本地模型 [ChatModel - Ollama](https://bytedance.larkoffice.com/wiki/WWngw1XMViwgyYkNuZgcjZnxnke) -3. ARK ChatModel: 使用 ARK 平台的模型服务 [ChatModel - ARK](https://bytedance.larkoffice.com/wiki/WUzzwaX8ricGwZk1i1mcJHHNnEl) -4. 更多查看: [Eino ChatModel](https://www.cloudwego.io/zh/docs/eino/ecosystem_integration/chat_model/) +[ChatModel](/zh/docs/eino/ecosystem_integration/chat_model) ## 自行实现参考 diff --git a/content/zh/docs/eino/core_modules/components/chat_template_guide.md b/content/zh/docs/eino/core_modules/components/chat_template_guide.md index 5cfdf7d11e1..a80ceaec62a 100644 --- a/content/zh/docs/eino/core_modules/components/chat_template_guide.md +++ b/content/zh/docs/eino/core_modules/components/chat_template_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2025-11-20" lastmod: "" tags: [] -title: 'Eino: ChatTemplate 使用说明' +title: ChatTemplate 使用说明 weight: 7 --- diff --git a/content/zh/docs/eino/core_modules/components/document_loader_guide/_index.md b/content/zh/docs/eino/core_modules/components/document_loader_guide/_index.md index 63a0f8a2c6a..0e10568368a 100644 --- a/content/zh/docs/eino/core_modules/components/document_loader_guide/_index.md +++ b/content/zh/docs/eino/core_modules/components/document_loader_guide/_index.md @@ -3,7 +3,7 @@ Description: "" date: "2025-11-20" lastmod: "" tags: [] -title: 'Eino: Document Loader 使用说明' +title: Document Loader 使用说明 weight: 1 --- diff --git a/content/zh/docs/eino/core_modules/components/document_loader_guide/document_parser_interface_guide.md b/content/zh/docs/eino/core_modules/components/document_loader_guide/document_parser_interface_guide.md index 3c9ce80c2ad..168e1995296 100644 --- a/content/zh/docs/eino/core_modules/components/document_loader_guide/document_parser_interface_guide.md +++ b/content/zh/docs/eino/core_modules/components/document_loader_guide/document_parser_interface_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2025-07-21" lastmod: "" tags: [] -title: 'Eino: Document Parser 接口使用说明' +title: Document Parser 接口使用说明 weight: 1 --- diff --git a/content/zh/docs/eino/core_modules/components/document_transformer_guide.md b/content/zh/docs/eino/core_modules/components/document_transformer_guide.md index 64682e05a77..fa0d2764a98 100644 --- a/content/zh/docs/eino/core_modules/components/document_transformer_guide.md +++ b/content/zh/docs/eino/core_modules/components/document_transformer_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2025-07-21" lastmod: "" tags: [] -title: 'Eino: Document Transformer 使用说明' +title: Document Transformer 使用说明 weight: 3 --- diff --git a/content/zh/docs/eino/core_modules/components/embedding_guide.md b/content/zh/docs/eino/core_modules/components/embedding_guide.md index c6f22f8c85e..329129f3d87 100644 --- a/content/zh/docs/eino/core_modules/components/embedding_guide.md +++ b/content/zh/docs/eino/core_modules/components/embedding_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2025-07-21" lastmod: "" tags: [] -title: 'Eino: Embedding 使用说明' +title: Embedding 使用说明 weight: 2 --- diff --git a/content/zh/docs/eino/core_modules/components/indexer_guide.md b/content/zh/docs/eino/core_modules/components/indexer_guide.md index e8bd87bf1cb..d2ddb520d0b 100644 --- a/content/zh/docs/eino/core_modules/components/indexer_guide.md +++ b/content/zh/docs/eino/core_modules/components/indexer_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2026-01-20" lastmod: "" tags: [] -title: 'Eino: Indexer 使用说明' +title: Indexer 使用说明 weight: 5 --- diff --git a/content/zh/docs/eino/core_modules/components/lambda_guide.md b/content/zh/docs/eino/core_modules/components/lambda_guide.md index e3b555fd6e9..004c4a37593 100644 --- a/content/zh/docs/eino/core_modules/components/lambda_guide.md +++ b/content/zh/docs/eino/core_modules/components/lambda_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2025-11-20" lastmod: "" tags: [] -title: 'Eino: Lambda 使用说明' +title: Lambda 使用说明 weight: 4 --- diff --git a/content/zh/docs/eino/core_modules/components/retriever_guide.md b/content/zh/docs/eino/core_modules/components/retriever_guide.md index f3e0eaacde4..dfc7ede9845 100644 --- a/content/zh/docs/eino/core_modules/components/retriever_guide.md +++ b/content/zh/docs/eino/core_modules/components/retriever_guide.md @@ -3,7 +3,7 @@ Description: "" date: "2026-01-30" lastmod: "" tags: [] -title: 'Eino: Retriever 使用说明' +title: Retriever 使用说明 weight: 6 --- diff --git a/content/zh/docs/eino/core_modules/components/tools_node_guide/_index.md b/content/zh/docs/eino/core_modules/components/tools_node_guide/_index.md index d8e9a77fc79..2561cabb5b5 100644 --- a/content/zh/docs/eino/core_modules/components/tools_node_guide/_index.md +++ b/content/zh/docs/eino/core_modules/components/tools_node_guide/_index.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-03" lastmod: "" tags: [] -title: 'Eino: ToolsNode&Tool 使用说明' +title: ToolsNode&Tool 使用说明 weight: 9 --- diff --git a/content/zh/docs/eino/core_modules/devops/_index.md b/content/zh/docs/eino/core_modules/devops/_index.md index 55c1d1eab84..8d6aa4030ab 100644 --- a/content/zh/docs/eino/core_modules/devops/_index.md +++ b/content/zh/docs/eino/core_modules/devops/_index.md @@ -3,7 +3,7 @@ Description: "" date: "2025-07-21" lastmod: "" tags: [] -title: 'Eino Dev: 应用开发工具链' +title: 应用开发工具链 weight: 5 --- diff --git a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_Ark_Agentkit_Sandbox.md b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_Ark_Agentkit_Sandbox.md index b98ad356bc5..b80be13db1c 100644 --- a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_Ark_Agentkit_Sandbox.md +++ b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_Ark_Agentkit_Sandbox.md @@ -1,9 +1,9 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-10" lastmod: "" tags: [] -title: 'Backend: Ark Agentkit Sandbox' +title: Ark Agentkit Sandbox weight: 1 --- @@ -11,7 +11,7 @@ weight: 1 Package: `github.com/cloudwego/eino-ext/adk/backend/agentkit` -注意:如果 eino 版本是 v0.8.0 及以上,需要使用 ark agentkit backend 的 [v0.2.0-alpha](https://github.com/cloudwego/eino-ext/releases/tag/adk%2Fbackend%2Fagentkit%2Fv0.2.0-alpha.1) 版本。 +注意:如果 eino 版本是 v0.8.0 及以上,需要使用 ark agentkit backend 的[ adk/backend/agentkit/v0.2.1](https://github.com/cloudwego/eino-ext/releases/tag/adk%2Fbackend%2Fagentkit%2Fv0.2.1) 版本。 ### 概述 @@ -92,9 +92,10 @@ func main() { }) // 读取文件 - content, err := backend.Read(ctx, &filesystem.ReadRequest{ + fContent, err := backend.Read(ctx, &filesystem.ReadRequest{ FilePath: "/home/gem/hello.txt", }) + fmt.Println(fContent.Content) } ``` @@ -146,7 +147,7 @@ files, _ := backend.LsInfo(ctx, &filesystem.LsInfoRequest{ }) // 读取文件(分页) -content, _ := backend.Read(ctx, &filesystem.ReadRequest{ +fcontent, _ := backend.Read(ctx, &filesystem.ReadRequest{ FilePath: "/home/gem/file.txt", Offset: 0, Limit: 100, @@ -192,10 +193,6 @@ result, _ := backend.Execute(ctx, &filesystem.ExecuteRequest{ ### 常见问题 -**Q: Write 返回 "file already exists" 错误** - -这是安全特性,使用不同文件名或用 Edit 修改现有文件。 - **Q: 认证失败** 检查环境变量、AK/SK 是否匹配、账户是否有 Ark Sandbox 权限。 diff --git "a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_\346\234\254\345\234\260\346\226\207\344\273\266\347\263\273\347\273\237.md" "b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_\346\234\254\345\234\260\346\226\207\344\273\266\347\263\273\347\273\237.md" index 0edc7855997..356d445ddd8 100644 --- "a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_\346\234\254\345\234\260\346\226\207\344\273\266\347\263\273\347\273\237.md" +++ "b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/Backend_\346\234\254\345\234\260\346\226\207\344\273\266\347\263\273\347\273\237.md" @@ -1,9 +1,9 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-10" lastmod: "" tags: [] -title: 'Backend: 本地文件系统' +title: 本地文件系统 weight: 2 --- @@ -11,7 +11,7 @@ weight: 2 Package: `github.com/cloudwego/eino-ext/adk/backend/local` -注意:如果 eino 版本是 v0.8.0 及以上,需要使用 local backend 的 [v0.2.0-alpha](https://github.com/cloudwego/eino-ext/releases/tag/adk%2Fbackend%2Flocal%2Fv0.2.0-alpha.1) 版本。 +注意:如果 eino 版本是 v0.8.0 及以上,需要使用 local backend 的 [adk/backend/local/v0.2.1](https://github.com/cloudwego/eino-ext/releases/tag/adk%2Fbackend%2Flocal%2Fv0.2.1) 版本。 ### 概述 @@ -67,9 +67,10 @@ func main() { }) // 读取文件 - content, err := backend.Read(ctx, &filesystem.ReadRequest{ + fcontent, err := backend.Read(ctx, &filesystem.ReadRequest{ FilePath: "/tmp/hello.txt", }) + fmt.Println(fcontent.Content) } ``` @@ -139,7 +140,7 @@ files, _ := backend.LsInfo(ctx, &filesystem.LsInfoRequest{ }) // 读取文件(分页) -content, _ := backend.Read(ctx, &filesystem.ReadRequest{ +fcontent, _ := backend.Read(ctx, &filesystem.ReadRequest{ FilePath: "/path/to/file.txt", Offset: 0, Limit: 50, @@ -217,17 +218,9 @@ absPath, _ := filepath.Abs("./relative/path") ### 常见问题 -**Q: 为什么需要绝对路径?** - -防止目录遍历攻击,使用 `filepath.Abs()` 转换。 - -**Q: Write 失败** - -文件已存在(安全特性)、路径非绝对路径、或权限不足。 - **Q: GrepRaw 支持正则吗?** -不支持,使用字面量匹配。需要正则可用 Execute 调用系统 grep。 +支持正则匹配,GrepRaw 底层使用的是 ripgrep 命令做的 Grep 操作 **Q: Windows 支持吗?** diff --git a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/_index.md b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/_index.md index 82ab11d1115..e108aabe972 100644 --- a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/_index.md +++ b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_FileSystem/_index.md @@ -3,7 +3,7 @@ Description: "" date: "2026-03-02" lastmod: "" tags: [] -title: 'Middleware: FileSystem' +title: FileSystem weight: 1 --- diff --git a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PatchToolCalls.md b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PatchToolCalls.md index 3ea95bb80ca..bdabd3ef26c 100644 --- a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PatchToolCalls.md +++ b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PatchToolCalls.md @@ -1,16 +1,16 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-09" lastmod: "" tags: [] -title: 'Middleware: PatchToolCalls' +title: PatchToolCalls weight: 7 --- adk/middlewares/patchtoolcalls > 💡 -> PatchToolCalls 中间件用于修复消息历史中「悬空的工具调用」(dangling tool calls)问题。本中间件在 [v0.8.0.Beta](https://github.com/cloudwego/eino/releases/tag/v0.8.0-beta.1) 版本引入。 +> PatchToolCalls 中间件用于修复消息历史中「悬空的工具调用」(dangling tool calls)问题。本中间件在 v0.8.0 版本引入。 ## 概述 diff --git a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PlanTask.md b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PlanTask.md index fb271214a58..2ffde35c6d9 100644 --- a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PlanTask.md +++ b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_PlanTask.md @@ -1,9 +1,9 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-09" lastmod: "" tags: [] -title: 'Middleware: PlanTask' +title: PlanTask weight: 4 --- @@ -12,7 +12,7 @@ weight: 4 adk/middlewares/plantask > 💡 -> 本中间件在 [v0.8.0.Beta](https://github.com/cloudwego/eino/releases/tag/v0.8.0-beta.1) 版本引入。 +> 本中间件在 v0.8.0 版本引入。 ## 概述 diff --git a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Skill.md b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Skill.md index 2ba36200ee0..beaa5fa0857 100644 --- a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Skill.md +++ b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Skill.md @@ -1,9 +1,9 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-10" lastmod: "" tags: [] -title: 'Middleware: Skill' +title: Skill weight: 2 --- @@ -240,10 +240,10 @@ func NewLocalBackend(config *LocalBackendConfig) (*LocalBackend, error) ## 初始化 -创建 Skill Middleware(推荐使用 `NewChatModelAgentMiddleware`): +创建 Skill Middleware(推荐使用 `NewMiddleware`): ```go -func NewChatModelAgentMiddleware(ctx context.Context, config *Config) (adk.ChatModelAgentMiddleware, error) +func NewMiddleware(ctx context.Context, config *Config) (adk.ChatModelAgentMiddleware, error) ``` Config 中配置为: @@ -300,10 +300,10 @@ workdir/ - 创建本地 filesystem backend,基于 backend 创建 Skill middleware: ```go -import ( +import ( "github.com/cloudwego/eino/adk/middlewares/skill" "github.com/cloudwego/eino-ext/adk/backend/local" -) +) be, err := local.NewBackend(ctx, &local.Config{}) @@ -317,6 +317,8 @@ skillBackend, err := skill.NewBackendFromFilesystem(ctx, &skill.BackendFromFiles Backend: be, BaseDir: skillsDir, }) + +skillMiddleware, err := NewMiddleware(ctx, &Config{Backend: backend}) ``` - 基于 backend 创建本地 Filesystem Middleware,供 agent 读取 skill 其他文件以及执行脚本: @@ -326,7 +328,7 @@ import ( "github.com/cloudwego/eino/adk/middlewares/filesystem" ) -fsm, err := filesystem.NewMiddleware(ctx, &filesystem.Config{ +fsm, err := filesystem.New(ctx, &filesystem.MiddlewareConfig{ Backend: be, WithoutLargeToolResultOffloading: true, }) @@ -340,7 +342,7 @@ agent, err := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{ Description: "An agent that can analyze logs", Instruction: "You are a helpful assistant.", Model: cm, - Middlewares: []adk.ChatModelAgentMiddleware{fsm, skillMiddleware}, + Handlers: []adk.ChatModelAgentMiddleware{fsm, skillMiddleware}, }) ``` diff --git a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Summarization.md b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Summarization.md index 00fcd2f7c14..94604afcf30 100644 --- a/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Summarization.md +++ b/content/zh/docs/eino/core_modules/eino_adk/Eino_ADK_ChatModelAgentMiddleware/Middleware_Summarization.md @@ -1,9 +1,9 @@ --- Description: "" -date: "2026-03-02" +date: "2026-03-09" lastmod: "" tags: [] -title: 'Middleware: Summarization' +title: Summarization weight: 3 --- @@ -12,7 +12,7 @@ weight: 3 Summarization 中间件会在对话的 token 数量超过配置阈值时,自动压缩对话历史。这有助于在长对话中保持上下文连续性,同时控制在模型的 token 限制范围内。 > 💡 -> 本中间件在 [v0.8.0.Beta](https://github.com/cloudwego/eino/releases/tag/v0.8.0-beta.1) 版本引入。 +> 本中间件在 v0.8.0 版本引入。 ## 快速开始 @@ -45,9 +45,9 @@ agent, err := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{
| 事件类型 | 触发时机 | 携带数据 |
| ActionTypeBeforeSummary | 生成摘要之前 | 原始消息列表 |
| ActionTypeAfterSummary | 完成总结之后 | 最终消息列表 |
| ActionTypeBeforeSummarize | 生成摘要之前 | 原始消息列表 |
| ActionTypeAfterSummarize | 完成总结之后 | 最终消息列表 |