dify接入微信的服务器部署

前提:使用的是Ubuntu-22.04-x64系统

下载项目代码

git clone https://github.com/hanfangyuan4396/dify-on-wechat

进入dify-on-wechat文件夹

cd dify-on-wechat/

安装核心依赖

pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple

如果出现下面错误,表示你的系统中没有安装 pip 命令(如果没有错误,可跳到安装拓展依赖)

依次执行下面代码

sudo apt update
sudo apt install python3-pip

安装拓展依赖

pip3 install -r requirements-optional.txt -i https://mirrors.aliyun.com/pypi/simple

在项目根目录创建名为config.json的文件

touch config.json

使用vim打开并填写下面的内容

vim config.json
{
  "dify_api_base": "改为你的接口",
  "dify_api_key": "改为你的密钥",
  "dify_app_type": "agent",
  "channel_type": "wx",
  "model": "dify",
  "single_chat_prefix": [""],
  "single_chat_reply_prefix": "",
  "group_chat_prefix": ["@bot"],
  "group_name_white_list": ["ALL_GROUP"],
  "accept_friend_commands": ["加好友"],
  "group_exit_msg": "退群聊通知文案",
  "accept_friend_msg": "通过好友发送的提示语"
}

启动

python3 app.py

扫码登陆即可(注意这里的微信号必须是实名注册过的)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值