上一页 1 2 3 4 5 6 7 ··· 499 下一页
摘要: mockClear Clears all information about every call. After calling it, all properties on .mock will return to their initial state. This method does not 阅读全文
posted @ 2026-03-01 19:56 Zhentiw 阅读(5) 评论(0) 推荐(0)
摘要: 核心概念 子图直接“嵌入”到父图内,成为父图的一部分,与父图共享 state 的 key。 示意图: 父图节点 > { 子图内部的很多节点 } > 父图下一个节点 看起来像父图的一个 node,但内部却是一个完整的 graph。 也正因为如此: 子图与父图使用同一个 state(共享部分或全部 ke 阅读全文
posted @ 2026-02-24 14:38 Zhentiw 阅读(6) 评论(0) 推荐(0)
摘要: 所谓子图,顾名思义,就是在一张图里面还嵌套了另外一张图。 子图常见的应用场景: 构建多智能体系统 在多个图中复用一组节点 分布式开发 当希望不同团队独立开发图的不同部分时,可以将每个部分定义为一个子图。 只要子图的接口(输入输出 schema)保持一致,父图就可以在无需了解子图内部细节的情况下进行构 阅读全文
posted @ 2026-02-23 14:53 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: Overview A small demo, using LangGrpah to calling real tool to write an artical about the topic user defined. Project structure tool-calls ├── output 阅读全文
posted @ 2026-02-23 14:37 Zhentiw 阅读(9) 评论(0) 推荐(0)
摘要: 一、从“语法糖”到“换芯术”:TypeScript 与 Go 的工程化综述 在很多团队的技术栈演进路径中,TypeScript 常常扮演“前后端通吃”的全能角色:前端 React/Vue、Node.js 后端、BFF 层、Serverless 函数,几乎都能看到它的身影。它在 JavaScript 阅读全文
posted @ 2026-02-22 16:10 Zhentiw 阅读(73) 评论(0) 推荐(0)
摘要: 2 ways: 1. globalThis.process.env 2. Install @types/node 阅读全文
posted @ 2026-02-20 14:26 Zhentiw 阅读(7) 评论(0) 推荐(0)
摘要: Tool Results When we call tools, we get the result of the tool call and because we have structured content, we can use it programmatically. This enabl 阅读全文
posted @ 2026-02-16 14:52 Zhentiw 阅读(44) 评论(0) 推荐(0)
摘要: 有些时候,可能会出现这么一种场景: 在节点内部,根据计算结果,动态决定要跳到哪个下一节点,而不是提前把所有边写死。 节点:负责做事情 边:决定走哪一条路线 传统方案节点只能做: return { ...state update... } 而流程走向由 graph 的 .addEdge() 固定决定的 阅读全文
posted @ 2026-02-16 14:31 Zhentiw 阅读(42) 评论(0) 推荐(0)
摘要: MapReduce模式,常用于: 拆分任务 并发处理 汇总结果 的场景,例如: 批量调用多个外部接口 对列表进行向量化处理 对多个检索结果做合并 .... 核心思想 分而治之 对应LangGraph两个阶段: Map阶段:将一份输入(列表)拆分成多份,并发的执行,扇出的阶段 Reduce阶段:将所有 阅读全文
posted @ 2026-02-13 14:31 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: 1. 快速上手 实现循环的图 // 快速上手 import { StateGraph, START, END } from "@langchain/langgraph"; import { z } from "zod/v4"; // 定义状态的Schema const Schema = z.obje 阅读全文
posted @ 2026-02-11 15:16 Zhentiw 阅读(17) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 499 下一页