{"id":13455068,"url":"https://github.com/ConnectAI-E/feishu-openai","last_synced_at":"2025-03-24T07:32:20.853Z","repository":{"id":65751004,"uuid":"598539671","full_name":"ConnectAI-E/feishu-openai","owner":"ConnectAI-E","description":"🎒 飞书  ×（GPT-4 + GPT-4V + DALL·E-3 + Whisper）=  飞一般的工作体验  🚀 语音对话、角色扮演、多话题讨论、图片创作、表格分析、文档导出 🚀","archived":false,"fork":false,"pushed_at":"2025-02-26T05:48:22.000Z","size":16032,"stargazers_count":5564,"open_issues_count":88,"forks_count":958,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-03-16T14:53:08.817Z","etag":null,"topics":["chatgpt","chatgpt-api","chatgpt-bot","connect-ai","feishu-bot","go","golang","openai"],"latest_commit_sha":null,"homepage":"https://feishu.market","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ConnectAI-E.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-07T10:18:28.000Z","updated_at":"2025-03-15T06:08:21.000Z","dependencies_parsed_at":"2023-11-19T04:20:36.031Z","dependency_job_id":"e911793c-d356-4f68-83a9-65d7a2add416","html_url":"https://github.com/ConnectAI-E/feishu-openai","commit_stats":{"total_commits":342,"total_committers":35,"mean_commits":9.771428571428572,"dds":"0.26023391812865493","last_synced_commit":"50822810021373bc7f87a7b03502b4dc4655aa82"},"previous_names":["leizhenpeng/feishu-chatgpt"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2Ffeishu-openai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2Ffeishu-openai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2Ffeishu-openai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2Ffeishu-openai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConnectAI-E","download_url":"https://codeload.github.com/ConnectAI-E/feishu-openai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245227563,"owners_count":20580898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","chatgpt-api","chatgpt-bot","connect-ai","feishu-bot","go","golang","openai"],"created_at":"2024-07-31T08:01:00.929Z","updated_at":"2025-03-24T07:32:20.839Z","avatar_url":"https://github.com/ConnectAI-E.png","language":"Go","readme":"\u003cimg width=\"1280\" alt=\"飞书 AI 对话\" src=\"https://github.com/user-attachments/assets/f5b27246-6d56-43a3-a4e1-9db8c69f698d\" /\u003e\n\n\u003ca href=\"https://www.connectai-e.com\" target=\"_blank\" rel=\"noreferrer\"\u003e\n  \u003cimg align=\"center\" width=\"100%\" height=\"auto\" src=\"https://github-production-user-asset-6210df.s3.amazonaws.com/50035229/250274252-7f07a95e-b5aa-4dd8-90e7-5fb3bfb863c7.svg\" \u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cdetails align='center' style=\"margin-top: 10px\"\u003e\n    \u003csummary\u003e 📷 点击展开完整功能\u003c/summary\u003e\n    \u003cbr\u003e\n    \u003cp align='center'\u003e\n        \u003cimg src='https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/b3543ae5-23cc-4fd7-829b-74656a300901' width='800'/\u003e\n        \u003cimg src='https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/948b051a-c25a-4825-8a18-5b72f6660b87' width='800'/\u003e\n        \u003cimg src='https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/a2139cc3-021e-4820-8e95-53a70541f136' width='800'/\u003e\n        \u003cimg src='https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/8e700709-ec0d-4c5e-b4af-710e42a0ba69' width='800'/\u003e\n        \u003cimg src='https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/001cb314-5fe2-4c93-86a7-66ea747b7855' width='800'/\u003e\n        \u003cimg src='https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/4dc12ca6-5305-4bc5-bf1a-40354c17ef29' width='800'/\u003e\n        \u003cimg src='https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/0c3178a0-e648-4013-a042-c1f83dbbe847' width='800'/\u003e   \n    \u003c/p\u003e\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n\u003cp align='center'\u003e\n   飞书 ×（GPT-4 + DALL·E + Whisper）\n\u003cbr\u003e\n\u003cbr\u003e\n    🚀 Feishu OpenAI 🚀\n\u003c/p\u003e\n\n  \n\u003cp align='center'\u003e\n   www.connectai-e.com\n\u003c/p\u003e\n\n\n## 商业支持\n\n升级至商业共创版，满足您公司的需求：\n1. 全面支持：集成OpenAI、Midjourney等主流AI模型，充足资源满足小团队全年需求。\n2. 超值优惠：后续补充AI资源价格仅为官方价的60%，为您节省成本。\n3. 持续更新：企联AI已获「奇绩创坛」数百万天使投资，确保商业版持续优化和质量提升。\n4. 管理便捷：实用Admin Panel助您轻松管理AI资源、查询日志、避免风险词汇和权限控制。\n5. 高度安全：提供在线SaaS版与企业级私有部署，确保数据安全和隐私保护。\n\n查看更多内容: https://www.connectai-e.com\n\n企业客户咨询: 15623677720\n\n\u003cimg width=\"300\" src=\"https://github.com/DDMeaqua/Feishu-OpenAI/assets/110169811/0a07f7e2-183f-4ee4-a40a-e33ee5c440e4\"\u003e\n\u003cimg width=\"300\" src=\"https://github.com/ConnectAI-E/Feishu-OpenAI/assets/110169811/ef313ce0-158e-4314-a932-e6b1180cc750\"\u003e\n\n\n\n## 👻 机器人功能\n\n🗣 语音交流：私人直接与机器人畅所欲言「Whisper」\n\n🕵️ 图片推理: 借助大模型互动式对话图片「GPT4V」\n\n💬 多话题对话：支持私人和群聊多话题讨论，高效连贯\n\n🖼 文本成图：支持文本成图和以图搜图 「DALLE-3」\n\n🛖 场景预设：内置丰富场景列表，一键切换AI角色\n\n🎭 角色扮演：支持场景模式，增添讨论乐趣和创意\n\n🤖 AI模式：内置4种AI模式，感受AI的智慧与创意\n\n🔄 上下文保留：回复对话框即可继续同一话题讨论\n\n⏰ 自动结束：超时自动结束对话，支持清除讨论历史\n\n📝 富文本卡片：支持富文本卡片回复，信息更丰富多彩\n\n👍 交互式反馈：即时获取机器人处理结果\n\n🎰 余额查询：即时获取token消耗情况\n\n🔙 历史回档：轻松回档历史对话，继续话题讨论 🚧\n\n🔒 管理员模式：内置管理员模式，使用更安全可靠 🚧\n\n🌐 多token负载均衡：优化生产级别的高频调用场景\n\n↩️ 支持反向代理：为不同地区的用户提供更快、更稳定的访问体验\n\n📚 与飞书文档互动：成为企业员工的超级助手 🚧\n\n🎥 话题内容秒转PPT：让你的汇报从此变得更加简单 🚧\n\n📊 表格分析：轻松导入飞书表格，提升数据分析效率 🚧\n\n🍊 私有数据训练：利用公司产品信息对GPT二次训练，更好地满足客户个性化需求 🚧\n\n\n\n## 🌟 项目特点\n\n- 🍏 支持 OpenAI (https://platform.openai.com/account/api-keys) 主要Chat接口:GPT4、DALL·E-3、Whisper、GPT-4V\n- 🍎 将 ChatGPT 接入[飞书](https://open.feishu.cn/app)和[飞书国际版](https://www.larksuite.com/)\n- 🥒\n  支持[Serverless 云函数](https://github.com/serverless-devs/serverless-devs)、[本地环境](https://dashboard.cpolar.com/login)、[Docker](https://www.docker.com/)、[二进制安装包](https://github.com/Leizhenpeng/feishu-chatgpt/releases/)\n  等多种渠道部署\n  \n## 项目部署\n\n###### 有关飞书的配置文件说明，**[➡︎ 点击查看](#详细配置步骤)**\n\n\u003cdetails\u003e\n    \u003csummary\u003e本地部署\u003c/summary\u003e\n\u003cbr\u003e\n\n```bash\ngit clone git@github.com:Leizhenpeng/feishu-chatgpt.git\ncd feishu-chatgpt/code\n```\n\n如果你的服务器没有公网 IP，可以使用反向代理的方式\n\n飞书的服务器在国内对 ngrok 的访问速度很慢，所以推荐使用一些国内的反向代理服务商\n\n- [cpolar](https://dashboard.cpolar.com/)\n- [natapp](https://natapp.cn/)\n\n```bash\n# 配置config.yaml\nmv config.example.yaml config.yaml\n\n//测试部署\ngo run main.go\ncpolar http 9000\n\n//正式部署\nnohup cpolar http 9000 -log=stdout \u0026\n\n//查看服务器状态\nhttps://dashboard.cpolar.com/status\n\n// 下线服务\nps -ef | grep cpolar\nkill -9 PID\n```\n\n更多详细介绍，参考[飞书上的小计算器: Go 机器人来啦](https://www.bilibili.com/video/BV1nW4y1378T/)\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eserverless云函数(阿里云等)部署\u003c/summary\u003e\n\u003cbr\u003e\n\n```bash\ngit clone git@github.com:Leizhenpeng/feishu-chatgpt.git\ncd feishu-chatgpt/code\n```\n\n安装[severless](https://docs.serverless-devs.com/serverless-devs/quick_start)工具\n\n```bash\n# 配置config.yaml\nmv config.example.yaml config.yaml\n# 安装severless cli\nnpm install @serverless-devs/s -g\n```\n\n安装完成后，请根据您本地环境，根据下面教程部署`severless`\n\n- 本地 `linux`/`mac os` 环境\n\n1. 修改`s.yaml`中的部署地区和部署秘钥\n\n```\nedition: 1.0.0\nname: feishuBot-chatGpt\naccess: \"aliyun\" #  修改自定义的秘钥别称\n\nvars: # 全局变量\nregion: \"cn-hongkong\" # 修改云函数想要部署地区\n\n```\n\n2. 一键部署\n\n```bash\ncd ..\ns deploy\n```\n\n- 本地`windows`\n\n1. 首先打开本地`cmd`命令提示符工具，运行`go env`检查你电脑上 go 环境变量设置, 确认以下变量和值\n\n```cmd\nset GO111MODULE=on\nset GOARCH=amd64\nset GOOS=linux\nset CGO_ENABLED=0\n```\n\n如果值不正确，比如您电脑上为`set GOOS=windows`, 请运行以下命令设置`GOOS`变量值\n\n```cmd\ngo env -w GOOS=linux\n```\n\n2. 修改`s.yaml`中的部署地区和部署秘钥\n\n```\nedition: 1.0.0\nname: feishuBot-chatGpt\naccess: \"aliyun\" #  修改自定义的秘钥别称\n\nvars: # 全局变量\n  region: \"cn-hongkong\" #  修改云函数想要部署地区\n\n```\n\n3. 修改`s.yaml`中的`pre-deploy`, 去除第二步`run`前面的环变量改置部分\n\n```\n  pre-deploy:\n        - run: go mod tidy\n          path: ./code\n        - run: go build -o\n            target/main main.go  # 删除GO111MODULE=on GOOS=linux GOARCH=amd64 CGO_ENABLED=0\n          path: ./code\n\n```\n\n4. 一键部署\n\n```bash\ncd ..\ns deploy\n```\n\n更多详细介绍，参考[仅需 1min，用 Serverless 部署基于 gin 的飞书机器人](https://www.bilibili.com/video/BV1nW4y1378T/)\n\u003cbr\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e使用 Railway 平台一键部署\u003c/summary\u003e\n\n\nRailway 是一家国外的 Serverless 平台，支持多种语言，可以一键将 GitHub 上的代码仓库部署到 Railway 平台，然后在 Railway\n平台上配置环境变量即可。部署本项目的流程如下：\n\n#### 1. 生成 Railway 项目\n\n点击下方按钮即可创建一个对应的 Railway 项目，其会自动 Fork 本项目到你的 GitHub 账号下。\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/10D-TF?referralCode=oMcVS2)\n\n#### 2. 配置环境变量\n\n在打开的页面中，配置环境变量，每个变量的说明如下图所示：\n\n\n\u003cimg src='https://user-images.githubusercontent.com/50035229/225005602-88d8678f-9d17-4dc5-8d1e-4abf64fb84fd.png' alt='Railway 环境变量' width='500px'/\u003e\n\n#### 3. 部署项目\n\n填写完环境变量后，点击 Deploy 就完成了项目的部署。部署完成后还需获取对应的域名用于飞书机器人访问，如下图所示：\n\n\u003cimg src='https://user-images.githubusercontent.com/50035229/225006236-57cb3c8a-1b7d-4bfe-9c9b-099cb9179027.png' alt='Railway 域名' width='500px'/\u003e\n\n如果不确定自己部署是否成功，可以通过访问上述获取到的域名 (https://xxxxxxxx.railway.app/ping) 来查看是否返回了`pong`\n，如果返回了`pong`，说明部署成功。\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003eRepl.it部署\u003c/summary\u003e\n\u003cbr\u003e\n\nThe fastest way to deploy the feishu-openai to `repl.it` is to click the `run on repl.it` button below.\n\n\u003ca href=\"https://replit.com/@Leizhenpeng/Feishu-OpenAI#.replit\"\u003e\n  \u003cimg alt=\"Run on Repl.it\" src=\"https://repl.it/badge/github/alist-org/alist-replit\" style=\"height: 40px; width: 190px;\" /\u003e\n\u003c/a\u003e\n\nRemember switch to `secrets` tab then edit `System environment variables`.You can also edit raw json:\n\n```json\n{\n  \"APP_ID\": \"\",\n  \"APP_SECRET\": \"\",\n  \"APP_ENCRYPT_KEY\": \"\",\n  \"APP_VERIFICATION_TOKEN\": \"\",\n  \"BOT_NAME\": \"ChatGPT\",\n  \"OPENAI_KEY\": \"sk-\",\n  \"OPENAI_MODEL\": \"gpt-3.5-turbo\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003edocker部署\u003c/summary\u003e\n\u003cbr\u003e\n\n```bash\ndocker build -t feishu-chatgpt:latest .\ndocker run -d --name feishu-chatgpt -p 9000:9000 \\\n--env APP_ID=xxx \\\n--env APP_SECRET=xxx \\\n--env APP_ENCRYPT_KEY=xxx \\\n--env APP_VERIFICATION_TOKEN=xxx \\\n--env BOT_NAME=chatGpt \\\n--env OPENAI_KEY=\"sk-xxx1,sk-xxx2,sk-xxx3\" \\\n--env API_URL=\"https://api.openai.com\" \\\n--env HTTP_PROXY=\"\" \\\nfeishu-chatgpt:latest\n```\n\n注意:\n\n- `BOT_NAME` 为飞书机器人名称，例如 `chatGpt`\n- `OPENAI_KEY` 为openai key，多个key用逗号分隔，例如 `sk-xxx1,sk-xxx2,sk-xxx3`\n- `HTTP_PROXY` 为宿主机的proxy地址，例如 `http://host.docker.internal:7890`,没有代理的话，可以不用设置\n- `API_URL` 为openai api 接口地址，例如 `https://api.openai.com`, 没有反向代理的话，可以不用设置\n\n---\n\n小白简易化 docker 部署\n\n- docker 地址: https://hub.docker.com/r/leizhenpeng/feishu-chatgpt\n\n```bash\ndocker run -d --restart=always --name feishu-chatgpt2 -p 9000:9000 -v /etc/localtime:/etc/localtim:ro  \\\n--env APP_ID=xxx \\\n--env APP_SECRET=xxx \\\n--env APP_ENCRYPT_KEY=xxx \\\n--env APP_VERIFICATION_TOKEN=xxx \\\n--env BOT_NAME=chatGpt \\\n--env OPENAI_KEY=\"sk-xxx1,sk-xxx2,sk-xxx3\" \\\n--env API_URL=https://api.openai.com \\\n--env HTTP_PROXY=\"\" \\\ndockerproxy.com/leizhenpeng/feishu-chatgpt:latest\n```\n\n事件回调地址: http://IP:9000/webhook/event\n卡片回调地址: http://IP:9000/webhook/card\n\n把它填入飞书后台\n\n--- \n\n部署azure版本\n\n```bash\ndocker build -t feishu-chatgpt:latest .\ndocker run -d --name feishu-chatgpt -p 9000:9000 \\\n--env APP_ID=xxx \\\n--env APP_SECRET=xxx \\\n--env APP_ENCRYPT_KEY=xxx \\\n--env APP_VERIFICATION_TOKEN=xxx \\\n--env BOT_NAME=chatGpt \\\n--env AZURE_ON=true \\\n--env AZURE_API_VERSION=xxx \\\n--env AZURE_RESOURCE_NAME=xxx \\\n--env AZURE_DEPLOYMENT_NAME=xxx \\\n--env AZURE_OPENAI_TOKEN=xxx \\\nfeishu-chatgpt:latest\n```\n\n注意:\n\n- `BOT_NAME` 为飞书机器人名称，例如 `chatGpt`\n- `AZURE_ON` 为是否使用azure ,请填写 `true`\n- `AZURE_API_VERSION` 为azure api版本 例如 `2023-03-15-preview`\n- `AZURE_RESOURCE_NAME` 为azure 资源名称 类似 `https://{AZURE_RESOURCE_NAME}.openai.azure.com`\n- `AZURE_DEPLOYMENT_NAME` 为azure 部署名称 类似 `https://{AZURE_RESOURCE_NAME}.openai.azure.com/deployments/{AZURE_DEPLOYMENT_NAME}/chat/completions`\n- `AZURE_OPENAI_TOKEN` 为azure openai token\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003edocker-compose 部署\u003c/summary\u003e\n\u003cbr\u003e\n\n编辑 docker-compose.yaml，通过 environment 配置相应环境变量（或者通过 volumes 挂载相应配置文件），然后运行下面的命令即可\n\n```bash\n# 构建镜像\ndocker compose build\n\n# 启动服务\ndocker compose up -d\n\n# 停止服务\ndocker compose down\n```\n\n事件回调地址: http://IP:9000/webhook/event\n卡片回调地址: http://IP:9000/webhook/card\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e二进制安装包部署\u003c/summary\u003e\n\u003cbr\u003e\n\n1. 进入[release 页面](https://github.com/Leizhenpeng/feishu-chatgpt/releases/) 下载对应的安装包\n2. 解压安装包,修改 config.example.yml 中配置信息,另存为 config.yaml\n3. 目录下添加文件 `role_list.yaml`，自定义角色，可以从这里获取：[链接](https://github.com/Leizhenpeng/feishu-chatgpt/blob/master/code/role_list.yaml)\n3. 运行程序入口文件 `feishu-chatgpt`\n\n事件回调地址: http://IP:9000/webhook/event\n卡片回调地址: http://IP:9000/webhook/card\n\n\u003c/details\u003e\n\n## 详细配置步骤\n\n\u003cdetails align='left'\u003e\n    \u003csummary\u003e 📸 点击展开飞书机器人配置的分步截图指导\u003c/summary\u003e\n    \u003cbr\u003e\n    \u003cp align='center'\u003e\n    \u003cimg src='https://user-images.githubusercontent.com/50035229/223943381-39e0466f-2a5e-472a-9863-94eafb5f17b0.png' alt='' width='800'/\u003e\n    \u003cimg src='https://user-images.githubusercontent.com/50035229/223943448-228de5cb-0929-4d80-8087-8d8624dd6ddf.png' alt='' width='800'/\u003e\n    \u003cimg src='https://user-images.githubusercontent.com/50035229/223943485-ef331784-7940-4657-b128-70c98391e72f.png' alt='' width='800'/\u003e\n    \u003cimg src='https://user-images.githubusercontent.com/50035229/223943527-60e6653a-eb6e-4062-a076-b6c9da934352.png' alt='' width='800'/\u003e\n    \u003cimg src='https://user-images.githubusercontent.com/50035229/223943972-f49adf9f-af5f-463a-8c7a-c1f0cac0e8c3.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223944060-7ef630a4-4248-4509-852b-cad8bfffeefc.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223944230-aff586be-31cc-40de-9b1a-7d4e259d54dd.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223944350-917d115c-6c82-4d8b-9ec8-b5c82331a2dc.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223944381-97396156-f5e2-467f-aaf6-b1f6e1c446b2.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/230003546-36450f2f-b6e9-4292-8b40-3a4aa8a05a64.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223945122-f7ab3d9a-6742-43d2-970e-ddb0f284c7fa.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223944507-8d1a08d7-8b5b-4f32-a90d-fd338164ec82.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223944515-fb505e84-c840-484a-8df5-612f60bf27ea.png' alt='' width='800'/\u003e\n      \u003cimg src='https://user-images.githubusercontent.com/50035229/223944590-ad61320f-c14a-4542-80ad-dee2e6469b67.png' alt='' width='800'/\u003e\n    \u003c/p\u003e\n\u003c/details\u003e\n\n\n- 获取 [OpenAI](https://platform.openai.com/account/api-keys) 的 KEY( 🙉 下面有免费的 KEY 供大家测试部署 )\n- 创建 [飞书](https://open.feishu.cn/) 机器人\n    1. 前往[开发者平台](https://open.feishu.cn/app?lang=zh-CN)创建应用,并获取到 APPID 和 Secret\n    2. 前往`应用功能-机器人`, 创建机器人\n    3. 从 cpolar、serverless 或 Railway 获得公网地址，在飞书机器人后台的 `事件订阅` 板块填写。例如，\n        - `http://xxxx.r6.cpolar.top`为 cpolar 暴露的公网地址\n        - `/webhook/event`为统一的应用路由\n        - 最终的回调地址为 `http://xxxx.r6.cpolar.top/webhook/event`\n    4. 在飞书机器人后台的 `机器人` 板块，填写消息卡片请求网址。例如，\n        - `http://xxxx.r6.cpolar.top`为 cpolar 暴露的公网地址\n        - `/webhook/card`为统一的应用路由\n        - 最终的消息卡片请求网址为 `http://xxxx.r6.cpolar.top/webhook/card`\n    5. 在事件订阅板块，搜索三个词`机器人进群`、 `接收消息`、 `消息已读`, 把他们后面所有的权限全部勾选。\n       进入权限管理界面，搜索`图片`, 勾选`获取与上传图片或文件资源`。\n       最终会添加下列回调事件\n        - im:resource(获取与上传图片或文件资源)\n        - im:message\n        - im:message.group_at_msg(获取群组中所有消息)\n        - im:message.group_at_msg:readonly(接收群聊中@机器人消息事件)\n        - im:message.p2p_msg(获取用户发给机器人的单聊消息)\n        - im:message.p2p_msg:readonly(读取用户发给机器人的单聊消息)\n        - im:message:send_as_bot(获取用户在群组中@机器人的消息)\n        - im:chat:readonly(获取群组信息)\n        - im:chat(获取与更新群组信息)\n\n\n5. 发布版本，等待企业管理员审核通过\n\n更多介绍，参考[飞书上的小计算器: Go 机器人来啦](https://www.bilibili.com/video/BV12M41187rV/)\n\n\n## 一起交流\n\n遇到问题，可以加入飞书群沟通~\n\n\u003cimg src='https://github.com/ConnectAI-E/feishu-openai/assets/110169811/bc19db83-422e-4f2f-9465-77489817d482' alt='' width='300'/\u003e\n\n\n## 企联AI\n\n| \u003cdiv style=\"width:200px\"\u003eAI\u003c/div\u003e |             \u003cimg width=120\u003e SDK \u003cimg width=120\u003e              |                         Application                          |\n| :-------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |\n|              🎒OpenAI              |    [Go-OpenAI](https://github.com/ConnectAI-E/Go-OpenAI)     | [🏅Feishu-OpenAI](https://github.com/ConnectAI-E/Feishu-OpenAI), [🎖Lark-OpenAI](https://github.com/ConnectAI-E/Lark-OpenAI), [Feishu-EX-ChatGPT](https://github.com/ConnectAI-E/Feishu-EX-ChatGPT), [🎖Feishu-OpenAI-Stream-Chatbot](https://github.com/ConnectAI-E/Feishu-OpenAI-Stream-Chatbot), [Feishu-TLDR](https://github.com/ConnectAI-E/Feishu-TLDR),[Feishu-OpenAI-Amazing](https://github.com/ConnectAI-E/Feishu-OpenAI-Amazing), [Feishu-Oral-Friend](https://github.com/ConnectAI-E/Feishu-Oral-Friend), [Feishu-OpenAI-Base-Helper](https://github.com/ConnectAI-E/Feishu-OpenAI-Base-Helper), [Feishu-Vector-Knowledge-Management](https://github.com/ConnectAI-E/Feishu-Vector-Knowledge-Management), [Feishu-OpenAI-PDF-Helper](https://github.com/ConnectAI-E/Feishu-OpenAI-PDF-Helper), [🏅Dingtalk-OpenAI](https://github.com/ConnectAI-E/Dingtalk-OpenAI), [Wework-OpenAI](https://github.com/ConnectAI-E/Wework-OpenAI), [WeWork-OpenAI-Node](https://github.com/ConnectAI-E/WeWork-OpenAI-Node), [llmplugin](https://github.com/ConnectAI-E/llmplugin) |\n|             🤖 AutoGPT             |                            ------                            | [🏅AutoGPT-Next-Web](https://github.com/ConnectAI-E/AutoGPT-Next-Web) |\n|         🎭 Stablediffusion         |                            ------                            | [🎖Feishu-Stablediffusion](https://github.com/ConnectAI-E/Feishu-Stablediffusion) |\n|           🍎 Midjourney            | [Go-Midjourney](https://github.com/ConnectAI-E/Go-Midjourney) | [🏅Feishu-Midjourney](https://github.com/ConnectAI-E/Feishu-Midjourney), [🔥MidJourney-Web](https://github.com/ConnectAI-E/MidJourney-Web), [Dingtalk-Midjourney](https://github.com/ConnectAI-E/Dingtalk-Midjourney) |\n|            🍍 文心一言             |    [Go-Wenxin](https://github.com/ConnectAI-E/Go-Wenxin)     | [Feishu-Wenxin](https://github.com/ConnectAI-E/Feishu-Wenxin), [Dingtalk-Wenxin](https://github.com/ConnectAI-E/Dingtalk-Wenxin), [Wework-Wenxin](https://github.com/ConnectAI-E/Wework-Wenxin) |\n|             💸 Minimax             |   [Go-Minimax](https://github.com/ConnectAI-E/Go-Minimax)    | [Feishu-Minimax](https://github.com/ConnectAI-E/Feishu-Minimax), [Dingtalk-Minimax](https://github.com/ConnectAI-E/Dingtalk-Minimax), [Wework-Minimax](https://github.com/ConnectAI-E/Wework-Minimax) |\n|             ⛳️ CLAUDE              |    [Go-Claude](https://github.com/ConnectAI-E/Go-Claude)     | [Feishu-Claude](https://github.com/ConnectAI-E/Feishu-Claude), [DingTalk-Claude](https://github.com/ConnectAI-E/DingTalk-Claude), [Wework-Claude](https://github.com/ConnectAI-E/Wework-Claude) |\n|              🥁 PaLM               |      [Go-PaLM](https://github.com/ConnectAI-E/go-PaLM)       | [Feishu-PaLM](https://github.com/ConnectAI-E/Feishu-PaLM),[DingTalk-PaLM](https://github.com/ConnectAI-E/DingTalk-PaLM),[Wework-PaLM](https://github.com/ConnectAI-E/Wework-PaLM) |\n|             🎡 Prompt              |                            ------                            | [📖 Prompt-Engineering-Tutior](https://github.com/ConnectAI-E/Prompt-Engineering-Tutior) |\n|             🍋 ChatGLM             |                            ------                            | [Feishu-ChatGLM](https://github.com/ConnectAI-E/Feishu-ChatGLM) |\n|            ⛓ LangChain            |                            ------                            | [📖 LangChain-Tutior](https://github.com/ConnectAI-E/LangChain-Tutior) |\n|            🪄 One-click            |                            ------                            | [🎖Awesome-One-Click-Deployment](https://github.com/ConnectAI-E/Awesome-One-Click-Deployment) |\n\n\n\n\n\n\n开源社区：https://github.com/ConnectAI-E\n\n\n\n","funding_links":[],"categories":["Go","Large Language Model"],"sub_categories":["ChatGPT Apps"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConnectAI-E%2Ffeishu-openai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FConnectAI-E%2Ffeishu-openai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConnectAI-E%2Ffeishu-openai/lists"}