{"id":26090519,"url":"https://github.com/hsuehdev/ragflow-linebot-bridge","last_synced_at":"2026-04-21T01:31:43.784Z","repository":{"id":281078583,"uuid":"944097133","full_name":"HsuehDev/ragflow-linebot-bridge","owner":"HsuehDev","description":"Linebot api server for RagFlow Agent Service","archived":false,"fork":false,"pushed_at":"2025-03-06T21:05:39.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-06T22:20:04.947Z","etag":null,"topics":["fastapi","linebot","ragflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HsuehDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-03-06T19:27:04.000Z","updated_at":"2025-03-06T21:05:43.000Z","dependencies_parsed_at":"2025-03-06T22:20:11.353Z","dependency_job_id":"1ab300bc-10c3-4398-84f8-6a7753b89956","html_url":"https://github.com/HsuehDev/ragflow-linebot-bridge","commit_stats":null,"previous_names":["hsuehdev/ragflow-linebot-bridge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HsuehDev%2Fragflow-linebot-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HsuehDev%2Fragflow-linebot-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HsuehDev%2Fragflow-linebot-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HsuehDev%2Fragflow-linebot-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HsuehDev","download_url":"https://codeload.github.com/HsuehDev/ragflow-linebot-bridge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242673793,"owners_count":20167294,"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":["fastapi","linebot","ragflow"],"created_at":"2025-03-09T09:34:25.832Z","updated_at":"2026-04-21T01:31:43.751Z","avatar_url":"https://github.com/HsuehDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ragflow Agent to Linebot Connector\n\n## 概述\n\n這是一個將 **Ragflow Agent** 與 **Linebot** 連接的工具，旨在提供一個簡單且高效的解決方案，將 Ragflow Agent 的功能與 Linebot 的交互能力整合。此工具基於 **Docker** 技術封裝，並利用以下技術栈進行開發：\n\n- **FastAPI**：高效的 Web 框架，用於提供 HTTP API 接口\n- **Line-Bot-SDK**：專為開發 Line 聊天機器人提供的 SDK\n- **Ragflow-SDK**：與 Ragflow Agent 進行通信的 SDK\n\n## 先決條件\n\n在開始之前，您需要確保以下軟體已正確安裝：\n\n- **Docker**：用於容器化部署，確保您的開發環境能夠順利運行。\n- **Docker Compose**：用於定義和運行多容器 Docker 應用。\n\n請參考 [Docker 官方文檔](https://docs.docker.com/get-docker/) 進行安裝。\n\n## 安裝與配置\n\n### 1. 複製 `.env.example` 並創建 `.env` 配置文件\n\n首先，您需要複製 `.env.example` 文件並將其重命名為 `.env`，然後填寫必要的配置參數：\n\n```bash\ncp .env.example .env\n```\n\n### 2. 編輯 `.env` 配置文件\n\n打開 `.env` 文件並根據您的需求填入以下參數：\n\n- `LINE_CHANNEL_SECRET`：Linebot 的 Channel Secret\n- `LINE_CHANNEL_ACCESS_TOKEN`：Linebot 的 Access Token\n- `RAGFLOW_API_KEY`：Ragflow API 金鑰\n- `RAGFLOW_BASE_URL` : Ragflow API URL(需加上port, ragflow 預設為9380)\n- `AGENT_ID` : Ragflow Agent ID\n\n確保所有參數都已正確設置，這是應用程序正常運行的關鍵。\n\n### 3. 啟動應用\n\n一旦 `.env` 文件配置完成，使用以下命令來構建並啟動 Docker 容器：\n\n```bash\ndocker compose up --build -d\n```\n\n該命令會執行以下操作：\n\n- 構建 Docker 映像\n- 在背景運行應用服務\n\n## 訪問與使用\n\n當應用成功啟動後，您可以通過 FastAPI 提供的端點與 **Linebot** 進行交互。默認情況下，FastAPI 應用運行在端口 **5050**。您可以透過ngrok等三方內網穿透服務部署，並將url提供與Line Developer。\n  \n\n\n## 停止應用\n\n若您需要停止運行的應用，請使用以下命令：\n\n```bash\ndocker compose down\n```\n\n這將停止並移除所有相關的 Docker 容器、網絡和服務。\n\n## 注意事項\n\n- **配置文件**：請仔細檢查 `.env` 配置文件中的所有參數，尤其是與 Linebot 和 Ragflow Agent 相關的 API 金鑰。\n- **端口設置**：默認情況下，FastAPI 運行在 **5050** 端口。如果需要更改端口，請在 `.env` 文件中設置 `PORT` 參數。\n- **安全性**：請勿將 `.env` 文件暴露於公共版本控制系統，確保您的 API 密鑰和 Token 受到妥善保護。\n\n\n## 開源許可\n\n本專案採用 **MIT 許可證**。\n\n此文案由ChatGPT產生。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsuehdev%2Fragflow-linebot-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhsuehdev%2Fragflow-linebot-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsuehdev%2Fragflow-linebot-bridge/lists"}