{"id":19175820,"url":"https://github.com/connectai-e/feishu-ex-chatgpt","last_synced_at":"2025-05-07T19:11:01.287Z","repository":{"id":152510043,"uuid":"626012947","full_name":"ConnectAI-E/Feishu-EX-ChatGPT","owner":"ConnectAI-E","description":"🎒 Feishu-EX-ChatGPT 并通过注册机制来激活飞书机器人的插件生态，现已支持联网，生图，公式计算","archived":false,"fork":false,"pushed_at":"2023-05-29T12:30:29.000Z","size":2954,"stargazers_count":86,"open_issues_count":0,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-20T01:33:05.285Z","etag":null,"topics":["chatgpt","chatgpt-plugin","connect-ai","feishu-bot","go","golang","openai"],"latest_commit_sha":null,"homepage":"https://www.connectai-e.com","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-04-10T15:57:49.000Z","updated_at":"2024-12-03T08:32:31.000Z","dependencies_parsed_at":"2024-06-19T15:15:46.996Z","dependency_job_id":"836b1542-42fd-42b9-81ba-7832f168b8fe","html_url":"https://github.com/ConnectAI-E/Feishu-EX-ChatGPT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FFeishu-EX-ChatGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FFeishu-EX-ChatGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FFeishu-EX-ChatGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FFeishu-EX-ChatGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConnectAI-E","download_url":"https://codeload.github.com/ConnectAI-E/Feishu-EX-ChatGPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252940934,"owners_count":21828769,"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-plugin","connect-ai","feishu-bot","go","golang","openai"],"created_at":"2024-11-09T10:25:29.296Z","updated_at":"2025-05-07T19:11:01.260Z","avatar_url":"https://github.com/ConnectAI-E.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feishu-EX-ChatGPT\n\n\nFeishu-EX-ChatGPT 是让飞书接入一个拥有增强版本的 ChatGPT 功能。\n通过集成各种插件，Feishu-EX-ChatGPT 可以让 ChatGPT 更好地与外部服务进行交互。插件可以轻松扩展，并通过注册机制来注册和激活。此外，Feishu-EX-ChatGPT 插件系统还支持第三方服务的扩展能力。⚡\n\n## 功能 ✨\n\n1. 通过集成不同的插件来增强 ChatGPT 的外部能力。\n2. 插件可以进行随意扩展，并通过注册机制完成插件的注册与激活。\n3. 利用插件机制，实现对第三方服务的扩展能力。\n\n一起贡献更多插件能力，增强 FeishuEx 扩展能力。[github.com/agi-cn/llmplugin](https://github.com/agi-cn/llmplugin)\n\n\n![](./images/plugins.png)\n\n1. 正常提问，使用 ChatGPT 回答。\n2. 以 `#` 开头提问，使用插件进行回答。\n\n\n## 工作流程 🌊\n\n![how_it_works](./images/how_it_works.png)\n\n1. 注册插件列表以获取扩展能力。📝\n2. 根据用户的提问，选择并激活相应的插件（可能是一个或多个）。🎯\n3. 等待获取所有插件的结果，并汇总所有结果。🔁\n4. 将汇总后的结果返回给用户。🔙\n\n\n## 如何开始 🛠️\n\n1. 克隆此仓库到本地。\n2. 在项目中，根据需要创建自己的插件并实现相应的接口。\n3. 注册并激活插件。\n4. 开始使用 Feishu-EX-ChatGPT 与 ChatGPT 进行交互！🎉\n\n\n现在开始使用 Feishu-EX-ChatGPT，让您的飞书接入的 ChatGPT 拥有的功能更强大吧！🚀\n\n\n## 运行\n\n支持本地运行，或者使用 fly.io 进行部署。\n\n运行时，依赖环境变量支持，环境变量加载形式有：\n\n1. 设置系统环境变量\n2. 加载 .env 环境变量定义文件\n\n具体环境变量参考：`./dotenv.example` 文件说明。\n\n\n### 1. 本地运行\n\n使用 .env 环境变量文件，\n\n```bash\ncp dotenv.example .env\n\ngo run ./cmd\n```\n\n### 2. 集成 Stable Diffusion 插件\n\n![](./images/feishu-ex-sd.jpg)\n\n### 2. 搜索插件支持\n\n支持搜索引擎如下，\n\n1. agi.cn search 搜索插件 - 封装了 duckduckgo 搜索能力，且不需要额外申请 token，默认集成。\n2. 支持 Google Search 插件能力（需要申请 Google Search Engine Token）。\n\n\u003cdetails\u003e\n    \u003csummary\u003e申请 Google 搜索接口\u003c/summary\u003e\n\n1. 获取 [GOOGLE_ENGINE_ID](http://www.google.com/cse/)\n2. 开通 [GOOGLE_SEARCH_API](https://console.cloud.google.com/apis/api/customsearch.googleapis.com/metrics)\n2. 获取 [GOOGLE_TOKEN](https://console.cloud.google.com/apis/credentials?pli=1\u0026project=bobmac-344202)\n\n[主要参考](https://stackoverflow.com/questions/37083058/programmatically-searching-google-in-python-using-custom-search)\n\n\u003c/details\u003e\n\n没有配置 Google Search 的环境变量，则默认启动 duckduckgo 搜索。\n\n\n### 2. 飞书提问\n\n1. 没有支持 Plugin 时，效果如下，\n\n  ![](./images/answer_by_chatgpt.jpg)\n\n2. 支持 Plugin 时，效果，\n\n  ![](./images/answer_by_plugin.png)\n\n\n\n## 如何贡献\n\n1. 代码结构参考「整洁架构思想」，具体说明参考 [github.com/xpzouying/go-clean-arch](https://github.com/xpzouying/go-clean-arch)。\n2. 编码规范参考 [Go Code Review](https://github.com/golang/go/wiki/CodeReviewComments)\n\n\n## 部署机器人\n\n### 1. 部署飞书机器人服务\n\n因为飞书需要访问公网的 IP 地址，所以我们使用 [fly.io](https://fly.io/) 进行部署。一般情况下，免费额度都够用。\n\n\u003cdetails\u003e\n    \u003csummary\u003efly.io 部署流程\u003c/summary\u003e\n\n以 MacOS 为例，其他的类似。\n\n1. 登录 [https://fly.io/dashboard](https://fly.io/dashboard) 并注册账号。\n\n2. 安装 [Fly CLI](https://fly.io/docs/getting-started/installing-flyctl/)。\n\n3. 运行命令登录，`flyctl auth login`。\n\n  ```bash\n  Waiting for session... Done\n  successfully logged in as xpzouying@gmail.com\n  ```\n\n4. 运行 `flyctl apps create`，输入 app name： `feishuex-bot`。\n\n5. 使用 flyctl env 配置各种环境变量。\n  * flyctl secrets set FEISHU_APP_ID=cli_xxx\n  * flyctl secrets set FEISHU_APP_SECRET=abcABCxxx\n  * flyctl secrets set VERIFY_TOKEN=abcABCxxx\n  * flyctl secrets set ENCRYPT_KEY=abcABCxxx\n  * flyctl secrets set BOT_NAME=feishu-bot\n  * flyctl secrets set OPENAI_TOKEN=sk-xxx\n\n  配置后，使用 `flyctl secrets list` 查看环境变量设置。\n  ![](./images/fly_env_list.jpg)\n\n6. 部署程序：`flyctl deploy`。\n  ![](./images/fly_deploy.png)\n\n\n7. 查看状态：\n\n  * 通过命令行查看：`flyctl status`\n    ![](./images/fly_status.png)\n\n  * 通过页面查看 [https://fly.io/dashboard/personal](https://fly.io/dashboard/personal)\n    ![](./images/fly_dashboard.png)\n\n\u003c/details\u003e\n\n\n\n### 2. 配置飞书机器人\n\n使用 fly.io 成功部署后，可以在飞书开发平台配置请求地址。\n\n![](./images/feishu_bot_config.png)\n\n\n## 联系\n\n欢迎讨论更多功能扩展，\n\n \u003cimg src='https://github.com/ConnectAI-E/Feishu-EX-ChatGPT/assets/50035229/3a65502b-bfd5-4096-96d0-90ecc1b5d535' alt='' width='200'/\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectai-e%2Ffeishu-ex-chatgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnectai-e%2Ffeishu-ex-chatgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectai-e%2Ffeishu-ex-chatgpt/lists"}