跳到主要内容
此模块已弃用且不再受支持。以下文档不适用于 0.2.0 或更高版本。
此示例展示了如何在 LangChain 中使用 ChatGPT 检索插件。 要设置 ChatGPT 检索插件,请遵循此处的说明。

用法

import { ChatGPTPluginRetriever } from "@langchain/classic/retrievers/remote";

const retriever = new ChatGPTPluginRetriever({
  url: "http://0.0.0.0:8000",
  auth: {
    bearer: "super-secret-jwt-token-with-at-least-32-characters-long",
  },
});

const docs = await retriever.invoke("hello world");

console.log(docs);

以编程方式连接这些文档到 Claude、VSCode 等,通过 MCP 获取实时答案。
© . This site is unofficial and not affiliated with LangChain, Inc.