✨ 更新日志
🚀 安装部署
✒ 写作指引
🛠 站点配置
📊 网站统计
⭐ 主题配置
📩 评论插件
🧷 外部插件
🔊 站点订阅
⌨ 开发指引
👨👦👦 联系方式
🤝 购买服务
AI聊天机器人-ChatBase
category
tags
type
status
slug
date
password
Last edited time
Apr 29, 2024 10:40 AM
summary
icon
啥是ChatBase
Chatbase.co 是一款为网站构建自定义ChatGPT 界面的工具,用户只需上传文档或添加到网站的链接,就可以获得一个类似ChatGPT 的聊天机器人,并将它作为小组件添加到网站上。
网页右下角会出现一个对话框,您可以通过他搜索网页中的所有知识点。
![chatbase](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F05603bee-2832-4a5e-9195-c0c98252fa65%2FUntitled.png?table=block&id=e3228b4c-3615-4e0c-bf05-8aa92c3ac577&t=e3228b4c-3615-4e0c-bf05-8aa92c3ac577&width=672&cache=v2)
2024.4.29最新版本;配置成功的效果,右下角多出一个聊天按钮
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2F18de3eae-95ba-4bce-a124-a42401d8f171%2FUntitled.png?table=block&id=8c474e10-3c6c-48b4-b0f1-78427e17622f&t=8c474e10-3c6c-48b4-b0f1-78427e17622f&width=672&cache=v2)
直接询问对话
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2Ffc9289ff-d594-4f85-a091-5c857b13dca2%2FUntitled.png?table=block&id=136d6249-2801-4361-ad87-d188167181a4&t=136d6249-2801-4361-ad87-d188167181a4&width=624&cache=v2)
配置方法
用环境变量或修改代码的方式,在blog.config.js中添加您的chatbase-id即可。
另外,有了chatbase-id 您可以直接用内嵌网页的方式,将chatbase放在您的任意notion页面中,网页地址
获取ChatBase-id方法
1. 注册登录ChatBase
2. 根据引导,配置机器人的数据源
登陆成功后,创建一个新的聊天机器人,点击
New Chatbot
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2Fe47419d5-97e8-47ff-be2a-3e15a3c74348%2FUntitled.png?table=block&id=facdce27-3399-4e2b-baae-7147994fec32&t=facdce27-3399-4e2b-baae-7147994fec32&width=480&cache=v2)
这里要选择用什么数据源来训练机器人;默认是上传json文件,在这里我们选择爬取网站内容,点击Website:
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2F2fcb82bc-0c8d-47cd-8d61-6f83c96ca81a%2FUntitled.png?table=block&id=d1d97537-d88f-4531-be8d-c46aace9048e&t=d1d97537-d88f-4531-be8d-c46aace9048e&width=480&cache=v2)
这里使用站点地图的方式提交内容,输入网址后面加上
/sitemap.xml
,如下图,这是NotionNext每个站点默认的地图位置。![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2F8c229572-1204-4899-a8a3-d99d2a51a446%2FUntitled.png?table=block&id=2f072053-22d6-4523-ac55-c13ea9d31dd3&t=2f072053-22d6-4523-ac55-c13ea9d31dd3&width=624&cache=v2)
点击Load sitemap加载地图内容,此时平台会自动爬取您网站中的页面地址
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2F9a883725-afe4-445f-9941-ccf544d43c9c%2FUntitled.png?table=block&id=57283738-569d-4729-a43b-7c2df550cfeb&t=57283738-569d-4729-a43b-7c2df550cfeb&width=624&cache=v2)
(免费版只能读取10个页面生成机器人数据,这里我们要删除超出10个的多余链接)
我这边示例,只保留了几个重要链接,一个是about介绍页面,一个是archive归档页面,一篇文章;
点击Create Chatbot 训练机器人。
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2F74a28489-b478-4a5f-9906-13a5b06a7b52%2FUntitled.png?table=block&id=b48421a5-b05b-4477-a2c7-78f8bb7dbec3&t=b48421a5-b05b-4477-a2c7-78f8bb7dbec3&width=672&cache=v2)
等待进度条完成。最后可以在面板中看到配置信息
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2F520ead0c-9350-42c8-8efb-e17fafd911ee%2FUntitled.png?table=block&id=adb8d74d-0adb-48e6-b678-f115aabd151b&t=adb8d74d-0adb-48e6-b678-f115aabd151b&width=528&cache=v2)
在setting中可以设置默认欢迎语和用户提问的提示词,这里需要自己折腾一下,不展开叙述了。
3. 在Embed on Site 中找到id
点击Embed on site,会提示你需要将此机器人公开,
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2Fb1639d14-6d00-4b63-adb0-7d4c376bd1e2%2FUntitled.png?table=block&id=c6150a97-e030-4504-80bd-1586e1a16cca&t=c6150a97-e030-4504-80bd-1586e1a16cca&width=1010&cache=v2)
选择 make public即可
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2Fc0c07426-e667-4ce0-a6cc-e21ccb31d652%2FUntitled.png?table=block&id=a0f4ff2f-7a5e-46b8-848f-637eda5765ca&t=a0f4ff2f-7a5e-46b8-848f-637eda5765ca&width=576&cache=v2)
然后在弹出的确认框中就可以找到你的chatbotId了。
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F6c096b44-beb9-48ee-8f92-1efdde47f3a3%2F27dcd06c-f0bf-4507-aeda-bbe68c07fd7b%2FUntitled.png?table=block&id=080bd706-47ec-4e93-927d-f8fa26906ed7&t=080bd706-47ec-4e93-927d-f8fa26906ed7&width=528&cache=v2)
配置在NotionNext中
两种方案配置,任选其一:
- 添加一个环境变量
NEXT_PUBLIC_CHATBASE_ID
- 添加一个NotionConfig:
CHATBASE_ID
Loading...
Last update: