AI聊天机器人-ChatBase
category
tags
type
status
slug
summary
date
Last edited time
Sep 7, 2024 01:33 AM
icon
password
状态
天气
星期
日期
啥是ChatBase
Chatbase.co 是一款为网站构建自定义ChatGPT 界面的工具,用户只需上传文档或添加到网站的链接,就可以获得一个类似ChatGPT 的聊天机器人,并将它作为小组件添加到网站上。
网页右下角会出现一个对话框,您可以通过他搜索网页中的所有知识点。

2024.4.29最新版本;配置成功的效果,右下角多出一个聊天按钮

直接询问对话

配置方法
用环境变量或修改代码的方式,在blog.config.js中添加您的chatbase-id即可。
另外,有了chatbase-id 您可以直接用内嵌网页的方式,将chatbase放在您的任意notion页面中,网页地址
获取ChatBase-id方法
1. 注册登录ChatBase
2. 根据引导,配置机器人的数据源
登陆成功后,创建一个新的聊天机器人,点击
New Chatbot

这里要选择用什么数据源来训练机器人;默认是上传json文件,在这里我们选择爬取网站内容,点击Website:

这里使用站点地图的方式提交内容,输入网址后面加上
/sitemap.xml
,如下图,这是NotionNext每个站点默认的地图位置。
点击Load sitemap加载地图内容,此时平台会自动爬取您网站中的页面地址

(免费版只能读取10个页面生成机器人数据,这里我们要删除超出10个的多余链接)
我这边示例,只保留了几个重要链接,一个是about介绍页面,一个是archive归档页面,一篇文章;
点击Create Chatbot 训练机器人。

等待进度条完成。最后可以在面板中看到配置信息

在setting中可以设置默认欢迎语和用户提问的提示词,这里需要自己折腾一下,不展开叙述了。
3. 在Embed on Site 中找到id
点击Embed on site,会提示你需要将此机器人公开,

选择 make public即可

然后在弹出的确认框中就可以找到你的chatbotId了。

配置在NotionNext中
两种方案配置,任选其一:
- 添加一个环境变量
NEXT_PUBLIC_CHATBASE_ID
- 添加一个NotionConfig:
CHATBASE_ID
Prev
AI聊天机器人-Coze
Next
Facebook聊天插件[已失效]
Loading...