Skip to main content

Chaindesk

Chaindesk平台将来自任何地方的数据(数据源:文本、PDF、Word、PowerPoint、Excel、Notion、Airtable、Google Sheets等)带入数据存储区(多个数据源的容器)。 然后,您的数据存储区可以通过插件或任何其他大型语言模型(LLM)通过Chaindesk API连接到ChatGPT。

本笔记本展示了如何使用Chaindesk的检索器。

首先,您需要注册Chaindesk,创建一个数据存储区,添加一些数据并获取您的数据存储区API端点URL。您需要API密钥

查询

现在我们已经设置好了索引,我们可以设置一个检索器并开始查询。

from langchain.retrievers import ChaindeskRetriever
retriever = ChaindeskRetriever(
datastore_url="https://clg1xg2h80000l708dymr0fxc.chaindesk.ai/query",
# api_key="CHAINDESK_API_KEY", # 如果数据存储区是公开的,则可选
# top_k=10 # 可选
)
retriever.get_relevant_documents("什么是Daftpage?")
    [Document(page_content='✨ Made with DaftpageOpen main menuPricingTemplatesLoginSearchHelpGetting StartedFeaturesAffiliate ProgramGetting StartedDaftpage is a new type of website builder that works like a doc.It makes website building easy, fun and offers tons of powerful features for free. Just type / in your page to get started!Daftpage版权所有 © 2022 Daftpage, Inc.保留所有权利。产品定价模板帮助和支持帮助中心入门博客公司关于路线图Twitter联盟计划👾 Discord', metadata={'source': 'https:/daftpage.com/help/getting-started', 'score': 0.8697265}),
Document(page_content="✨ Made with DaftpageOpen main menuPricingTemplatesLoginSearchHelpGetting StartedFeaturesAffiliate ProgramHelp CenterWelcome to Daftpage’s help center—the one-stop shop for learning everything about building websites with Daftpage.Daftpage is the simplest way to create websites for all purposes in seconds. Without knowing how to code, and for free!Get StartedDaftpage is a new type of website builder that works like a doc.It makes website building easy, fun and offers tons of powerful features for free. Just type / in your page to get started!Start here✨ Create your first site🧱 Add blocks🚀 PublishGuides🔖 Add a custom domainFeatures🔥 Drops🎨 Drawings👻 Ghost mode💀 Skeleton modeCant find the answer you're looking for?mail us at support@daftpage.comJoin the awesome Daftpage community on: 👾 DiscordDaftpage版权所有 © 2022 Daftpage, Inc.保留所有权利。产品定价模板帮助和支持帮助中心入门博客公司关于路线图Twitter联盟计划👾 Discord", metadata={'source': 'https:/daftpage.com/help', 'score': 0.86570895}),
Document(page_content="是在几秒钟内创建用于各种目的的网站的最简单方法。无需了解如何编码,而且还是免费的!开始使用Daftpage是一种新型的网站构建工具,它的工作方式类似于文档。它使网站构建变得简单、有趣,并提供了许多免费的强大功能。只需在您的页面中键入/即可开始!从这里开始✨ 创建您的第一个站点🧱 添加块🚀 发布指南🔖 添加自定义域名功能🔥 Drops🎨 Drawings👻 Ghost mode💀 Skeleton mode找不到您要找的答案?请发送电子邮件至support@daftpage.com加入令人惊叹的Daftpage社区:👾 DiscordDaftpage版权所有 © 2022 Daftpage, Inc.保留所有权利。产品定价模板帮助和支持帮助中心入门博客公司关于路线图Twitter联盟计划👾 Discord", metadata={'source': 'https:/daftpage.com/help', 'score': 0.8645384})]