上一页 1 2 3 4 5 6 7 8 9 ··· 498 下一页
摘要: When you have an async function, but your usecase doesn't need to wait for the promise to finish, instead of using await, you can use void to effectiv 阅读全文
posted @ 2026-01-23 14:09 Zhentiw 阅读(2) 评论(0) 推荐(0)
摘要: Modern AI applications often need to collect structured input from users at key moments in a workflow. Elicitation in the Model Context Protocol (MCP) 阅读全文
posted @ 2026-01-22 14:47 Zhentiw 阅读(7) 评论(0) 推荐(0)
摘要: 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 阅读(5) 评论(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 阅读(5) 评论(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 阅读(4) 评论(0) 推荐(0)
摘要: invoke/stream() 方法,方法签名如下: invoke/stream( input: Input, options?: RunnableConfig ): AsyncGenerator<StreamEvent<Output>> 1. 输入参数 (input) 类型:Input 与 inv 阅读全文
posted @ 2025-11-26 22:54 Zhentiw 阅读(65) 评论(0) 推荐(0)
摘要: 什么是回退机制? 可以理解为一种“保险机制”,就像: A 计划不行 → 执行 B 计划 A 服务器挂了 → 走 B 节点 A 模型限流 → 让本地模型顶上 主模型出错时,自动调用备用模型继续执行,用户无感知,体验不中断 如何实现回退 早期的时候,LangChain.js 没有提供相应的 API,所以 阅读全文
posted @ 2025-11-25 14:43 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: LangChain Hub LangChain Hub 是一个托管 Prompt 与 Chain 配置的集中仓库(可以理解成 Hugging Face Hub 的“提示词版”)。 它允许开发者: 上传 / 分享 自己的 prompt、chain 配置; 下游用户可以直接通过一个 key (autho 阅读全文
posted @ 2025-11-22 16:50 Zhentiw 阅读(111) 评论(0) 推荐(0)
摘要: 什么是 Agent 基础篇Agent概念 不是指的 AI 智能体,而是指代理服务器。 代理服务器充当用户和模型交流的中间人。 Agent: 狭义:代理服务器 广义:AI智能体(AI Agent) 什么是AI Agent AI Agent,中文称之为“AI智能体”,本质上是能自主感知环境,进行规划与决 阅读全文
posted @ 2025-11-19 15:08 Zhentiw 阅读(48) 评论(0) 推荐(0)
摘要: 在实际开发中,经常还有如下的需求: 禁止模型调用某个工具 强制调用某个工具 注册多个函数工具 禁止模型调用工具 默认情况下,模型会自行决定是否使用 tool。但有时你希望它只能用自己的知识回答,怎么办? 你可以通过 tool_choice: "none" 禁用工具调用。 const result = 阅读全文
posted @ 2025-11-18 01:09 Zhentiw 阅读(58) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 498 下一页