上一页 1 2 3 4 5 6 ··· 497 下一页
摘要: MapReduce模式,常用于: 拆分任务 并发处理 汇总结果 的场景,例如: 批量调用多个外部接口 对列表进行向量化处理 对多个检索结果做合并 .... 核心思想 分而治之 对应LangGraph两个阶段: Map阶段:将一份输入(列表)拆分成多份,并发的执行,扇出的阶段 Reduce阶段:将所有 阅读全文
posted @ 2026-02-13 14:31 Zhentiw 阅读(6) 评论(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 阅读(7) 评论(0) 推荐(0)
摘要: 边是两个节点的连接线,决定了图在运行时从哪里到哪里。 LangGraph 中边有 4 种类型: 普通边 条件边 入口点:START 条件入口点 普通边 连接两个节点,例如 nodeA 到 nodeB: graph.addEdge("nodeA", "nodeB"); 注意这里添加的边是有流向的,代表 阅读全文
posted @ 2026-02-11 14:33 Zhentiw 阅读(42) 评论(0) 推荐(0)
摘要: 并发 并发 英语为 Concurrency 指的是在同一时间段内,多个任务交替进行。这些任务没有真正同时运行,而是通过任务切换来营造“同时进行”的效果。 类比:一个服务员同时负责 3 桌客人,他会先给 A 桌上菜,再去 B 桌点单,然后回到 C 桌加水……看起来好像在同时照顾三桌,其实是快速切换任务 阅读全文
posted @ 2026-02-10 14:58 Zhentiw 阅读(6) 评论(0) 推荐(0)
摘要: 节点的本质就是一个函数,这个函数可以是同步的,也可以是异步的,该函数会自动被框架包装成 RunnableLambda。 1. RunnableLambda LangChain 提供的一种轻量级工具,它能把普通函数封装成符合 Runnable 接口规范的实例,从而让该函数能够无缝参与到 LCEL 的链 阅读全文
posted @ 2026-02-10 14:29 Zhentiw 阅读(5) 评论(0) 推荐(0)
摘要: While iframe-based UI components provide rich, visual interfaces, they need a way to communicate back to the host application to trigger actions, requ 阅读全文
posted @ 2026-02-09 14:32 Zhentiw 阅读(16) 评论(0) 推荐(0)
摘要: 二进制基础知识 1. 二进制表示数 一个格子 --> bit(位):计算机中最小的存储单位 2 个bit 种类数:22 = 4 数的范围:0~3(0~22 - 1) 8 个 bit 一组:byte:计算机中最小的访问单位 种类数:28 = 256 数的范围:0~255(0~28 - 1) 2. 反码 阅读全文
posted @ 2026-02-09 14:07 Zhentiw 阅读(6) 评论(0) 推荐(0)
摘要: Zod v4 + Schema Metadata + Reducer-Based State Compilation This is a single, self-contained learning note. It explains why LangGraph works, how the in 阅读全文
posted @ 2026-02-06 15:25 Zhentiw 阅读(3) 评论(0) 推荐(0)
摘要: Users expect iframes to fit their content perfectly, not waste space or require scrolling. The journal viewer should automatically adjust to show exac 阅读全文
posted @ 2026-02-02 14:38 Zhentiw 阅读(6) 评论(0) 推荐(0)
摘要: When iframes load in AI chat, the host application doesn't know when they're ready to receive data or handle interactions. Without this handshake, use 阅读全文
posted @ 2026-02-02 14:23 Zhentiw 阅读(7) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 497 下一页