首页 > 人工智能 > 人工智能 > nanobot+飞书,尝试养虾
现在小龙虾火的一塌糊涂,nanobot算是最简单的部署本地龙虾的方案,飞书算国内最好的龙虾聊天端。两个搞一下
windows
python环境
我有pyhton环境,最简单直接用pip
pip install nanobot-ai
运行初始化命令,创建配置文件:
nanobot onboard
这会在你的用户目录下创建 ~/.nanobot/ 文件夹,包含配置文件和工作目录。
会提示配置文件位置:
Created config at C:\Users\XXX.nanobot\config.json
nanobot是一个壳,api是大脑。找到上一步创建的onfig.json
api的配置主要涉及
"agents": {
"defaults": {
"model": "xxx", -- 每家的key不一样,我用的自己公司的
"provider": "custom" -- 下面配置的
}
}
因为我用的公司自己的,所以选的custom
providers": {
"custom": {
"apiKey": "xxx",-- 每家的key不一样,我用的自己公司的
"apiBase": "xxx"-- 每家的key不一样,我用的自己公司的
}
}
基础对话(命令行模式):
nanobot agent -m "2+2是多少?"
进入交互模式:
nanobot agent
im:message(发送消息)~/.nanobot/config.json,添加飞书配置,需要改的: "feishu": {
"enabled": true,
"appId": "xxx",
"appSecret": "xxx",
"allowFrom": ["*"],
}
nanobot gateway
im.message.receive_v1(接收消息),选择「长连接」模式
(99+ 封私信 / 6 条消息) 5 分钟上手 Nanobot:轻量级 AI 助手完整使用教程 - 知乎
nanobot:超轻量级个人 AI 助手 - OpenBayes
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70049647/viewspace-3114276/ ,如需转载,请注明出处,否则将追究法律责任。