上一页 1 2 3 4 5 6 ··· 495 下一页
摘要: Sometimes there are common workflows for people using your MCP server you want to make easier for users. You may not want your users to have to write 阅读全文
posted @ 2026-01-20 15:06 Zhentiw 阅读(4) 评论(0) 推荐(0)
摘要: Embedded resource:In Tools, you can also embed the resouce as additional information. https://modelcontextprotocol.io/specification/2025-06-18/server/ 阅读全文
posted @ 2026-01-19 14:35 Zhentiw 阅读(4) 评论(0) 推荐(0)
摘要: In previous exercises, you learned how to extend your MCP server with tools—server-defined functions that let clients perform actions or retrieve data 阅读全文
posted @ 2026-01-17 19:31 Zhentiw 阅读(3) 评论(0) 推荐(0)
摘要: invoke/stream() 方法,方法签名如下: invoke/stream( input: Input, options?: RunnableConfig ): AsyncGenerator<StreamEvent<Output>> 1. 输入参数 (input) 类型:Input 与 inv 阅读全文
posted @ 2025-11-26 22:54 Zhentiw 阅读(39) 评论(0) 推荐(0)
摘要: 什么是回退机制? 可以理解为一种“保险机制”,就像: A 计划不行 → 执行 B 计划 A 服务器挂了 → 走 B 节点 A 模型限流 → 让本地模型顶上 主模型出错时,自动调用备用模型继续执行,用户无感知,体验不中断 如何实现回退 早期的时候,LangChain.js 没有提供相应的 API,所以 阅读全文
posted @ 2025-11-25 14:43 Zhentiw 阅读(10) 评论(0) 推荐(0)
摘要: LangChain Hub LangChain Hub 是一个托管 Prompt 与 Chain 配置的集中仓库(可以理解成 Hugging Face Hub 的“提示词版”)。 它允许开发者: 上传 / 分享 自己的 prompt、chain 配置; 下游用户可以直接通过一个 key (autho 阅读全文
posted @ 2025-11-22 16:50 Zhentiw 阅读(63) 评论(0) 推荐(0)
摘要: 什么是 Agent 基础篇Agent概念 不是指的 AI 智能体,而是指代理服务器。 代理服务器充当用户和模型交流的中间人。 Agent: 狭义:代理服务器 广义:AI智能体(AI Agent) 什么是AI Agent AI Agent,中文称之为“AI智能体”,本质上是能自主感知环境,进行规划与决 阅读全文
posted @ 2025-11-19 15:08 Zhentiw 阅读(33) 评论(0) 推荐(0)
摘要: 在实际开发中,经常还有如下的需求: 禁止模型调用某个工具 强制调用某个工具 注册多个函数工具 禁止模型调用工具 默认情况下,模型会自行决定是否使用 tool。但有时你希望它只能用自己的知识回答,怎么办? 你可以通过 tool_choice: "none" 禁用工具调用。 const result = 阅读全文
posted @ 2025-11-18 01:09 Zhentiw 阅读(35) 评论(0) 推荐(0)
摘要: 作者:谢杰 原子化文件写入,是属于 原子化操作 的一种。那么问题来了,什么又是原子化操作呢? 原子化操作:英语 Atomic,指的是操作要么全部发生,要么完全不发生,对读者而言,中间状态是不可见的。 原子写入(Atomic Write) 可以保证文件不存在中间半写入状态,与之相对应的是 撕裂写(To 阅读全文
posted @ 2025-11-17 15:18 Zhentiw 阅读(49) 评论(0) 推荐(0)
摘要: 目前我们所使用的 Memory,大多只存在于内存中,一旦进程关闭、用户刷新页面,所有历史对话都会丢失。实际项目中,我们常常希望: 让用户“第二次回来”还能接着上次对话继续聊 将多轮聊天记录保存在本地或数据库中,用于分析、审计、训练、回溯 这时候,我们就需要将 Memory 做持久化操作,从而实现“记 阅读全文
posted @ 2025-11-16 23:07 Zhentiw 阅读(58) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 495 下一页