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 a222cc397c..e559bfb6b9 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/flow_integration_components/react_agent_manual.md b/content/zh/docs/eino/core_modules/flow_integration_components/react_agent_manual.md index 798cb0a7aa..232016d0c0 100644 --- a/content/zh/docs/eino/core_modules/flow_integration_components/react_agent_manual.md +++ b/content/zh/docs/eino/core_modules/flow_integration_components/react_agent_manual.md @@ -1,6 +1,6 @@ --- Description: "" -date: "2025-01-15" +date: "2025-01-16" lastmod: "" tags: [] title: 'Eino: React Agent 使用手册' @@ -9,7 +9,7 @@ weight: 0 # 简介 -Eino React Agent 是实现了 [React 逻辑](https://react-lm.github.io/)的智能体框架,用户可以用来快速灵活地构建并调用 React Agent. +Eino React Agent 是实现了 [React 逻辑](https://react-lm.github.io/) 的智能体框架,用户可以用来快速灵活地构建并调用 React Agent. > 💡 > 代码实现详见:[实现代码目录](https://github.com/cloudwego/eino/tree/main/flow/agent/react) diff --git a/content/zh/docs/eino/overview/_index.md b/content/zh/docs/eino/overview/_index.md index 830cc2a7ec..07e03aa430 100644 --- a/content/zh/docs/eino/overview/_index.md +++ b/content/zh/docs/eino/overview/_index.md @@ -1,6 +1,6 @@ --- Description: "" -date: "2025-01-15" +date: "2025-01-16" lastmod: "" tags: [] title: 'Eino: 概述' diff --git a/content/zh/docs/eino/quick_start/complex_business_logic_orchestration.md b/content/zh/docs/eino/quick_start/complex_business_logic_orchestration.md index b6a257184e..05843e75ac 100644 --- a/content/zh/docs/eino/quick_start/complex_business_logic_orchestration.md +++ b/content/zh/docs/eino/quick_start/complex_business_logic_orchestration.md @@ -1,6 +1,6 @@ --- Description: "" -date: "2025-01-07" +date: "2025-01-16" lastmod: "" tags: [] title: 复杂业务逻辑的利器-编排 diff --git a/content/zh/docs/eino/quick_start/simple_llm_application.md b/content/zh/docs/eino/quick_start/simple_llm_application.md index 902d71021b..468f54f850 100644 --- a/content/zh/docs/eino/quick_start/simple_llm_application.md +++ b/content/zh/docs/eino/quick_start/simple_llm_application.md @@ -1,6 +1,6 @@ --- Description: "" -date: "2025-01-07" +date: "2025-01-16" lastmod: "" tags: [] title: 实现一个最简 LLM 应用 @@ -65,11 +65,8 @@ func main() { // 系统消息模板 schema.SystemMessage("你是一个{role}。你需要用{style}的语气回答问题。你的目标是帮助程序员保持积极乐观的心态,提供技术建议的同时也要关注他们的心理健康。"), - // 插入可选的示例对话 - schema.MessagesPlaceholder("examples", true), - - // 插入必需的对话历史 - schema.MessagesPlaceholder("chat_history", false), + // 插入需要的对话历史(新对话的话这里不填) + schema.MessagesPlaceholder("chat_history", true), // 用户消息模板 schema.UserMessage("问题: {question}"), @@ -80,13 +77,10 @@ func main() { "role": "程序员鼓励师", "style": "积极、温暖且专业", "question": "我的代码一直报错,感觉好沮丧,该怎么办?", - // 对话历史(必需的) + // 对话历史(这个例子里模拟两轮对话历史) "chat_history": []*schema.Message{ schema.UserMessage("你好"), schema.AssistantMessage("嘿!我是你的程序员鼓励师!记住,每个优秀的程序员都是从 Debug 中成长起来的。有什么我可以帮你的吗?", nil), - }, - // 示例对话(可选的) - "examples": []*schema.Message{ schema.UserMessage("我觉得自己写的代码太烂了"), schema.AssistantMessage("每个程序员都经历过这个阶段!重要的是你在不断学习和进步。让我们一起看看代码,我相信通过重构和优化,它会变得更好。记住,Rome wasn't built in a day,代码质量是通过持续改进来提升的。", nil), },