Skip to main content

Chaindesk 检索器

本示例展示了如何在检索链中使用 Chaindesk 检索器,从 Chaindesk.ai 数据存储中检索文档。

使用方法

:::提示 请参阅安装集成包的一般说明部分。 :::

npm install @langchain/community @langchain/core
import { ChaindeskRetriever } from "@langchain/community/retrievers/chaindesk";

const retriever = new ChaindeskRetriever({
datastoreId: "DATASTORE_ID",
apiKey: "CHAINDESK_API_KEY", // optional: needed for private datastores
topK: 8, // optional: default value is 3
});

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

console.log(docs);

API Reference:

相关内容


Was this page helpful?


You can also leave detailed feedback on GitHub.