Giter Site home page Giter Site logo

feishu-chatgpt's Introduction


在飞书上与ChatGPT随时对话

Feishu ChatGpt

👻 机器人功能

  • 🗣 畅所欲言,直接语音交流 🚧
  • 💬 私人和群聊支持多话题同时对话,让讨论更加连贯和高效
  • 🔄 持续对话联系上下文,回复对话框即可继续同一话题讨论
  • ⏰ 超时自动结束对话,同时支持清除讨论历史
  • 📝 支持富文本卡片回复,让信息更加丰富多彩
  • 👍 交互式反馈提醒,及时获取机器人处理结果
  • 🎭 支持角色扮演的场景模式,为讨论增添乐趣和创意
  • 🏞 内置丰富的场景预设,让用户更方便地管理场景 🚧
  • 🔙 轻松恢复历史话题,继续讨论 🚧
  • 🖼 支持根据文本生成图片,增强信息呈现效果 🚧
  • 🔒 内置管理员模式,使用更加安全可靠 🚧

🌟 项目特点

项目部署

有关飞书的配置文件说明,➡︎ 点击查看
git clone [email protected]:Leizhenpeng/feishu-chatgpt.git
cd feishu-chatgpt/code
本地部署

如果你的服务器没有公网 IP,可以使用反向代理的方式

飞书的服务器在国内对ngrok的访问速度很慢,所以推荐使用一些国内的反向代理服务商

# 配置config.yaml
mv config.example.yaml config.yaml

//测试部署
go run main.go
cpolar http 9000

//正式部署
nohup cpolar http 9000 -log=stdout &

//查看服务器状态
https://dashboard.cpolar.com/status

// 下线服务
ps -ef | grep cpolar
kill -9 PID

更多详细介绍,参考飞书上的小计算器: Go机器人来啦


serverless云函数(阿里云等)部署

安装severless工具

# 配置config.yaml
mv config.example.yaml config.yaml
# 安装severless cli
npm install @serverless-devs/s -g

一键部署

cd ..
s deploy

更多详细介绍,参考仅需1min,用Serverless部署基于 gin 的飞书机器人

docker部署
docker build -t feishu-chatgpt:latest .
docker run -d --name feishu-chatgpt -p 9000:9000 \
--env APP_ID=xxx \
--env APP_SECRET=xxx \
--env APP_ENCRYPT_KEY=xxx \
--env APP_VERIFICATION_TOKEN=xxx \
--env BOT_NAME=chatGpt \
--env OPENAI_KEY=sk-xxx \
feishu-chatgpt:latest

小白简易化docker部署

docker run -d --restart=always --name feishu-chatgpt2 -p 9000:9000 -v /etc/localtime:/etc/localtim:ro  \
--env APP_ID=xxx \
--env APP_SECRET=xxx \
--env APP_ENCRYPT_KEY=xxx \
--env APP_VERIFICATION_TOKEN=xxx \
--env BOT_NAME=chatGpt \
--env OPENAI_KEY=sk-xxx \
dockerproxy.com/leizhenpeng/feishu-chatgpt:latest

事件回调地址: http://IP:9000/webhook/event 卡片回调地址: http://IP:9000/webhook/card

把它填入飞书后台

详细配置步骤

  • 获取 OpenAI 的 KEY
  • 创建 飞书 机器人
    1. 前往开发者平台创建应用,并获取到 APPID 和 Secret
    2. 前往应用功能-机器人, 创建机器人
    3. 从cpolar或者serverless获得公网地址,在飞书机器人后台的 事件订阅 板块填写。例如,
      • http://xxxx.r6.cpolar.top为cpolar暴露的公网地址
      • /webhook/event为统一的应用路由
      • 最终的回调地址为 http://xxxx.r6.cpolar.top/webhook/event
    4. 在飞书机器人后台的 机器人 板块,填写消息卡片请求网址。例如,
      • http://xxxx.r6.cpolar.top为cpolar暴露的公网地址
      • /webhook/card为统一的应用路由
      • 最终的消息卡片请求网址为 http://xxxx.r6.cpolar.top/webhook/card
    5. 给订阅添加下列回调事件
      • im:message
      • im:message.group_at_msg(获取群组中所有消息)
      • im:message.group_at_msg:readonly(接收群聊中@机器人消息事件)
      • im:message.p2p_msg(获取用户发给机器人的单聊消息)
      • im:message.p2p_msg:readonly(读取用户发给机器人的单聊消息)
      • im:message:send_as_bot(获取用户在群组中@机器人的消息)
      • im:chat:readonly(获取群组信息)
      • im:chat(获取与更新群组信息)
  1. 发布版本,等待企业管理员审核通过

更多介绍,参考飞书上的小计算器: Go机器人来啦

更多交流

企业如需定制部署,可联系WeChat: laolei_forkway,支持发票~

遇到其他问题,可以加入飞书群沟通~

feishu-chatgpt's People

Contributors

cfxks1989 avatar dishone avatar hyoban avatar leizhenpeng avatar trevorwang avatar webe998 avatar wm7799 avatar zhaoyifei9 avatar zhongweili avatar

Forkers

web-logs2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.