{"id":19098383,"url":"https://github.com/gpt-open/chatbot-gpt","last_synced_at":"2025-04-30T15:25:37.615Z","repository":{"id":243239293,"uuid":"811869496","full_name":"gpt-open/chatbot-gpt","owner":"gpt-open","description":"Chatbot-GPT, powered by OpenIM’s webhooks, seamlessly integrates with various messaging platforms. This tool enables private and group chats with bots, enhancing interactive communication. It delivers quick, automated responses, ideal for optimizing customer service and dynamic discussions, meeting diverse communication needs.","archived":false,"fork":false,"pushed_at":"2024-06-12T11:05:49.000Z","size":9601,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T04:42:01.903Z","etag":null,"topics":["aigc","chatbot","chatgpt","deepseek","gpt","llm","moonshort","openim","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpt-open.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,"zenodo":null}},"created_at":"2024-06-07T13:21:39.000Z","updated_at":"2025-02-11T08:05:13.000Z","dependencies_parsed_at":"2024-06-07T14:57:04.748Z","dependency_job_id":"ab520aad-e599-4807-a37d-a163ac24bbc9","html_url":"https://github.com/gpt-open/chatbot-gpt","commit_stats":null,"previous_names":["gpt-open/chatbot-gpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpt-open%2Fchatbot-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpt-open%2Fchatbot-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpt-open%2Fchatbot-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpt-open%2Fchatbot-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpt-open","download_url":"https://codeload.github.com/gpt-open/chatbot-gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251730442,"owners_count":21634387,"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":["aigc","chatbot","chatgpt","deepseek","gpt","llm","moonshort","openim","webhook"],"created_at":"2024-11-09T03:45:17.669Z","updated_at":"2025-04-30T15:25:37.589Z","avatar_url":"https://github.com/gpt-open.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003eChatbot-GPT\u003c/h1\u003e\nChatbot-GPT leverages OpenIM’s webhooks for seamless integration across messaging platforms, enhancing communication with intelligent, automated responses.\n\u003cbr/\u003e\n\u003ca href=\"https://chatbot.open-sora.ai/\" target=\"_blank\"\u003e Live Demo \u003c/a\u003e\n\u003cbr/\u003e\n\u003cimg style=\"display: block; margin: auto; width: 70%;\" src=\"./doc/screen_1.jpg\"\u003e\n\u003c/div\u003e\n\n# Contents\n\n- [Features](#features)\n- [Online Retrieval Architecture](#online-retrieval-architecture)\n- [Deploy the OpenIM Service](#deploy-the-openim-service)\n- [Deploy the Chatbot-GPT Service](#deploy-the-chatbot-gpt-service)\n  - [Step 1: Download repository code](#step-1-download-repository-code)\n  - [Step 2: Configure variables of .env](#step-2-configure-variables-of-env)\n  - [Step 3: Deploy Chatbot-GPT](#step-3-deploy-chatbot-gpt)\n    - [Deploy Chatbot-GPT using Docker](#deploy-chatbot-gpt-using-docker)\n    - [Deploy Chatbot-GPT from source code](#deploy-chatbot-gpt-from-source-code)\n      - [Set up the Python running environment](#set-up-the-python-running-environment)\n        - [Create and activate a virtual environment](#create-and-activate-a-virtual-environment)\n        - [Install dependencies with pip](#install-dependencies-with-pip)\n      - [Upload Bot configuration](#upload-bot-configuratio)\n      - [Start the service](#start-the-service)\n- [Register Chatbot-GPT](#Register-chatbot-gpt)\n  - [Register an account](#register-an-account)\n  - [Login and find the Bot](#login-and-find-the-bot)\n\n## Features\n\n- **Integrated LLM Support**: Incorporates both UnionLLM and LiteLLM, enabling simultaneous access to multiple large language models.\n- **Quick Setup**: Deploys production-level conversational service robots in just five minutes.\n- **Real-World Application**: Optimally designed for real-time customer service systems to tackle genuine business challenges.\n- **Attractive UI**: Offers a customizable and visually compelling user interface.\n\n## Online Retrieval Architecture\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg style=\"display: block; margin: auto;\" src=\"./doc/chatbot-gpt.drawio.png\"\u003e\n\u003c/div\u003e\n\n## Deploy the OpenIM Service\n\n### Step 1: Download repository code\n\nClone the repository:\n\n```shell\ngit clone https://github.com/openimsdk/openim-docker \u0026\u0026 cd openim-docker\n```\n\n### Step 2: Configure variables of .env\n\nModify the `.env` file to set up the external IP address for the MinIO and Grafana services.\n\n```shell\n# Set the external access address for MinIO service (external IP or domain)\nMINIO_EXTERNAL_ADDRESS=\"http://external_ip:10005\"\n# Set the external access address for Grafana service (external IP or domain)\nGRAFANA_URL=\"http://external_ip:13000/\"\n```\n\n### Step 3: Configure webhooks for Chatbot-GPT\n\nModify openim-server environment variables in `docker-compose.yaml`.\n\n```shell\n    openim-server:\n      ...\n      environment:\n        - IMENV_WEBHOOKS_URL=http://127.0.0.1:9000/open_chatbot\n        - IMENV_WEBHOOKS_AFTERSENDSINGLEMSG_ENABLE=true\n        - IMENV_WEBHOOKS_AFTERSENDGROUPMSG_ENABLE=true\n        ...\n```\n\n### Step 4: Start the OpenIM Service\n\n```shell\ndocker compose up -d\n```\n\n \u003e More details about OpenIM deploy, please refer to [OpenIM Docs](https://docs.openim.io/guides/gettingstarted/dockercompose)\n\n## Deploy the Chatbot-GPT Service\n\n### Step 1: Download repository code\n\nClone the repository:\n\n```shell\ngit clone https://github.com/gpt-open/chatbot-gpt.git \u0026\u0026 cd chatbot-gpt\n```\n\n### Step 2: Configure variables of .env\n\nBefore starting the Chatbot-GPT service, you need to modify the related configurations for the program to initialize correctly.\n\n```shell\ncp env_example .env\n```\n\nThe variables in .env\n\n```shell\nGET_TOKEN_URL=\"http://127.0.0.1:10009/account/login\"\nADD_BOT_URL=\"http://127.0.0.1:10009/user/import/json\"\nUPDATE_BOT_URL=\"http://127.0.0.1:10008/user/update\"\nSEND_MSG_URL=\"http://127.0.0.1:10002/msg/send_msg\"\nTOKEN_EXPIRE_DAYS=30\nMAX_HISTORY_SESSION_LENGTH=3\n```\n\n\u003e [!NOTE]\n\u003e Please modify the `GET_TOKEN_URL`, `ADD_BOT_URL`, `UPDATE_BOT_URL`, `SEND_MSG_URL`, and `TOKEN_EXPIRE_DAYS` in conjunction with the **OpenIM Server** configuration.\n\n### Step 3: Deploy Chatbot-GPT\n\n#### Deploy Chatbot-GPT using Docker\n\n```shell\ndocker-compose up --build\n```\n\n#### Deploy Chatbot-GPT from source code\n\n\u003e [!NOTE]\n\u003e Please use Python version 3.10.x or above.\n\n##### Set up the Python running environment\n\nIt is recommended to install Python-related dependencies in a Python virtual environment to avoid affecting dependencies of other projects.\n\n###### Create and activate a virtual environment\n\nIf you have not yet created a virtual environment, you can create one with the following command:\n\n```shell\npython3 -m venv myenv\n```\n\nAfter creation, activate the virtual environment:\n\n```shell\nsource myenv/bin/activate\n```\n\n###### Install dependencies with pip\n\nOnce the virtual environment is activated, you can use `pip` to install the required dependencies.\n\n```shell\npip install -r requirements.txt\n```\n\n##### Upload Bot configuration\n\n\u003e [!NOTE]\n\u003e Chatbot-GPT can integrate any number of LLM Bots.\n\u003e\n\u003e Please refer to `bot_config.yaml` and modify this configuration file according to your actual needs.\n\u003e\n\u003e **`userID`** in `bot_config.yaml` must be unique.\n\n```yml\nrobots:\n  OpenAI:\n    - apiKey: \"xxxx\"\n      model: \"gpt-3.5-turbo\"\n      userID: \"openai_robot1\"\n      nickname: \"ChatGPT 3.5\"\n      faceURL: \"https://openai.xiniushu.com/img/logo.png\"\n    - apiKey: \"xxxx\"\n      model: \"gpt-4o\"\n      userID: \"openai_robot2\"\n      nickname: \"ChatGPT 4o\"\n      faceURL: \"https://openai.xiniushu.com/img/logo.png\"\n\n  ZhipuAI:\n    - apiKey: \"xxxx\"\n      model: \"glm-3-turbo\"\n      userID: \"zhipuai_robot1\"\n      nickname: \"GLM-3\"\n      faceURL: \"https://pp.myapp.com/ma_icon/0/icon_54321899_1717467379/256\"\n    - apiKey: \"xxxx\"\n      model: \"glm-4\"\n      userID: \"zhipuai_robot2\"\n      nickname: \"GLM-4\"\n      faceURL: \"https://pp.myapp.com/ma_icon/0/icon_54321899_1717467379/256\"\n\n  Moonshot:\n    - apiKey: \"xxxx\"\n      model: \"moonshot-v1-32k\"\n      userID: \"moonshot_robot1\"\n      nickname: \"Moonshot-chat\"\n      faceURL: \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSnsfyv3cjhrqvNb-Mos6InwLI4Pnjdxiw8CVtxA-tRSlRWwl-nba84\u0026usqp=CAE\u0026s\"\n\n  Deepseek:\n    - apiKey: \"xxxx\"\n      model: \"deepseek/deepseek-chat\"\n      userID: \"deepseek_robot1\"\n      nickname: \"Deepseek-chat\"\n      faceURL: \"https://avatars.githubusercontent.com/u/148330874?s=200\u0026v=4\"\n```\n\n```shell\npython3 upload_bot_config.py\n```\n\n##### Start the service\n\nIf you have completed the steps above, you can try to start the Chatbot-GPT service by executing the following command.\n\n- **Start single process:**\n\n```shell\npython3 chatbot_app.py\n```\n\n- **Start multiple processes:**\n\n```shell\nsh start.sh\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e - The service port for Chatbot-GPT is **`9000`**. During the first test, please try not to change the port so that you can quickly experience the entire product process.\n\u003e - We recommend starting the Chatbot-GPT service using **`start.sh`** in multi-process mode for a smoother user experience.\n\n## Register Chatbot-GPT\n\n### Register an account\n\nPlease visit the link `http://127.0.0.1:9000/#/login` and register using your mobile number. The demo here does not require SMS verification code validation.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg style=\"display: block; margin: auto; width: 70%;\" src=\"./doc/register.jpg\"\u003e\n\u003c/div\u003e\n\n### Login and find the Bot\n\nLog in to Chatbot-GPT using your username and password, then you can add friends or join groups.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg style=\"display: block; margin: auto; width: 70%;\" src=\"./doc/find_bot.jpg\"\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpt-open%2Fchatbot-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpt-open%2Fchatbot-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpt-open%2Fchatbot-gpt/lists"}