Code Monkey home page Code Monkey logo

lark-shell-bot's Introduction

Feishu-Shell-Bot

功能很简单。就是跑一个shell命令客户端。跟飞书ChatBot相关 基于飞书客户端

配置请配置.feishu.env.sample 然后重命名到 .feishu.env 或者也可以直接在环境变量中注入相应的配置

效果

Gpt主功能

FEISHU_APP_ID=飞书的AppId
FEISHU_APP_SECRET=飞书的AppSecret
FEISHU_ENCRYPT_KEY=飞书的EncryptKey
FEISHU_VERIFICATION_TOKEN=飞书的验证Token
FEISHU_BOT_PATH=监听服务的path
FEISHU_BOT_PORT=监听的端口

具体配置的含义请参考飞书后台开发者的文档.
具体飞书怎么配置后端程序。请直接参考地址.
飞书开发者后台 飞书接入ChatGpt 其中飞书操作部分。权限和相应逻辑保持一致。服务默认端口为8080

直接使用(记得修改版本)

version=1.1
wget -O feishu_shell_bot https://github.com/friddle/lark-shell-bot/releases/download/${version}/feishu_shell_bot
chmod +x feishu_shell_bot
wget -O .feishu.env https://raw.githubusercontent.com/friddle/lark-shell-bot/master/.feishu.env.sample
编辑 .feishu.env
./feishu_shell_bot

或者使用

docker run -d -p 8080:8080 --env-file=.feishu.env friddle/lark-shell-bot

使用ChatGPT功能

ChatGpt功能

设置ChatGpt

编辑.chatgpt.env 文件.所有的key参考.chatgpt.env.sample
填写相应的key

CHATGPT_API_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaa
CHATGPT_API_TYPE=azure
CHATGPT_AZURE_RESOURCE=friddle
CHATGPT_AZURE_DEPLOYMENT=friddle-chatgpt-3.5
CHATGPT_AZURE_API_VERSION=2023-03-15-preview

然后飞书请求的时候执行

/chatgpt 查看本地目录

在服务器执行远程命令

设置服务器 服务器功能

编辑 .machines.yaml 文件
填写服务器信息,具体格式参考 .machines.yaml.sample
然后执行
/machines 查看服务器列表
/ssh machine-01 服务器名字 ls
/gptssh machine-01 服务器名字 查看当前目录

lark-shell-bot's People

Contributors

friddle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.