{"id":19188722,"url":"https://github.com/theexplainthis/chatgpt-customer-service","last_synced_at":"2025-07-18T03:06:02.349Z","repository":{"id":170339309,"uuid":"629339949","full_name":"TheExplainthis/ChatGPT-Customer-Service","owner":"TheExplainthis","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-29T08:25:07.000Z","size":3704,"stargazers_count":87,"open_issues_count":2,"forks_count":46,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T06:34:58.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/TheExplainthis.png","metadata":{"files":{"readme":"README.en.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":"2023-04-18T05:50:08.000Z","updated_at":"2024-09-11T06:04:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0346b12-84e7-4625-b3a5-9f5bb0155951","html_url":"https://github.com/TheExplainthis/ChatGPT-Customer-Service","commit_stats":null,"previous_names":["theexplainthis/chatgpt-customer-service"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Customer-Service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Customer-Service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Customer-Service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheExplainthis%2FChatGPT-Customer-Service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheExplainthis","download_url":"https://codeload.github.com/TheExplainthis/ChatGPT-Customer-Service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989940,"owners_count":21836665,"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":[],"created_at":"2024-11-09T11:25:47.646Z","updated_at":"2025-05-08T02:47:13.562Z","avatar_url":"https://github.com/TheExplainthis.png","language":"Python","funding_links":["https://www.buymeacoffee.com/explainthis"],"categories":[],"sub_categories":[],"readme":"# ChatGPT-Customer-Service\n\n[中文](README.md) | English\n\n[![license](https://img.shields.io/pypi/l/ansicolortags.svg)](LICENSE) [![Release](https://img.shields.io/github/v/release/TheExplainthis/ChatGPT-Customer-Service)](https://github.com/TheExplainthis/ChatGPT-Customer-Service/releases/)\n\n\n## Introduction\nThis project demonstrates how to build an intelligent customer service chatbot using the FAQ from Taoyuan Airport. The data can be replaced and modified as needed.\n\n![Demo](https://github.com/TheExplainthis/ChatGPT-Customer-Service/blob/main/demo/demo.gif)\n\n\n## Installation\n### Obtaining Tokens\n1. Obtain the API Token from OpenAI:\n    1. Register/login to an account on the [OpenAI](https://beta.openai.com/) platform\n    2. Click on the avatar in the upper right corner and select `View API keys`\n    3. Click on`Create new secret key` in the middle -\u003e the generated key is the `OPENAI_API_KEY` (which will be used later)\n    - Note: Each API has a free quota and restrictions, see [OpenAI Pricing](https://openai.com/api/pricing/) for details. \n2. Obtain the Line Token:\n    1. Login to [Line Developer](https://developers.line.biz/zh-hant/)\n    2. Create a bot:\n        1. Create a `Provider` -\u003e Click `Create`\n        2. Create a `Channel` -\u003e Select `Create a Messaging API channel`\n        3. Enter the required basic information\n        4. After completing the input, there is a Channel Secret under `Basic Settings` -\u003e Click `Issue`, the generated key is the `LINE_CHANNEL_SECRET` (which will be used later)\n        5. Under `Messaging API`, there is a `Channel access token` -\u003e Click `Issue`, the generated key is the `LINE_CHANNEL_ACCESS_TOKEN` (which will be used later)\n\n### Project Setup\n1. Fork the Github project:\n    1. Register/login to a [GitHub](https://github.com/) account\n    2. Go to [ChatGPT-Customer-Service](https://github.com/TheExplainthis/ChatGPT-Customer-Service) \n    3. Click `Star` to support the developer\n    4. Click `Fork` to copy all the code to your repository\n2. Deploy (free space):\n    1. Go to [replit](https://replit.com/)\n    2. Register/login to an account\n    3. Fork the [ChatGPT-Customer-Service-HyperDB](https://replit.com/@TheExplainthis/ChatGPT-Customer-Service-HyperDB)\n\n### Project Execution\n1. Environment variable settings\n    1. After completing the `Fork` in the previous step, click on `Secrets` on the left bottom corner of the project management page in `Replit`.\n    2. Click `Got it` on the right to add environment variables, including:\n        1. The selected model:\n            - key: `OPENAI_API_KEY`\n            - value: `[Obtained from step 1]`  \n        2. Line Channel Secret:\n            - key: `LINE_CHANNEL_SECRET`\n            - value: `[Obtained from step 1]`\n        3. Line Channel Access Token:\n            - key: `LINE_CHANNEL_ACCESS_TOKEN`\n            - value: `[Obtained from step 1]`\n2. Execution:\n    1. Click on `Run` on the top\n    2. After successful execution, the message `Hello World` will be displayed on the right side of the screen, and the **URL on the top of the screen should be copied**\n    3. Go back to the Line Developer, paste the URL obtained in the previous step above `Webhook URL` under `Messaging API`, and add `/callback`. For example: `https://ChatGPT-Customer-Service-HyperDB.explainthis.repl.co/callback`\n    4. Open `Use webhook` below\n    5. Turn off `Auto-reply messages` below\n    - Note: If there is no request within one hour, the program will stop, so the next step is necessary.\n3. CronJob sends requests regularly\n    1. Register/Login to [cron-job.org](https://cron-job.org/en/)\n    2. Select `CREATE CRONJOB` in the upper right corner of the dashboard\n    3. Enter `ChatGPT-Line-Bot` in the `Title` and enter the URL from the previous step. For example: `https://ChatGPT-Customer-Service-HyperDB.explainthis.repl.co/`\n    4. Set to run every `5 minutes` below\n    5. Click  `CREATE`\n\n## How to customize and modify?\nCurrently, the project will read the `taoyuan-airport-faq` file, which has the following format:\n\n| category | question | answer |\n| ----- | ----- | ----- |\n| 違禁品 | 安檢時碰到不得上機之危險（安）物品及違禁品，應如何處理？ | 不得上機之危險（安）物品﹕例如超過100ml容器液體、防風型打火機、水果刀…等），需丟棄或改託運；違法違禁品（槍、武士刀、扁鑽、毒品…等），將遭航空警察局移送法辦。|\n| 違禁品 | 請問樂器該如何上飛機? | 大型樂器需託運，小型可置於機上隨身物品放置箱者可隨身攜帶。 |\n| 違禁品 | 請問出境安檢手提行李的規定 （刮鬍刀、刮鬍泡... | 出境安檢手提行李規定：1. 電動刮鬍刀可以攜帶登機，丟棄式刮鬍刀、摺疊式刮鬍刀等有刀片外露形式者，禁止攜帶登機。 2. 刮鬍泡、容器... |\n\nYou can directly modify this file with the same format. After modifying the file, remember to delete the `hyperdb.pickle.gz` file that was originally on the Replit website before running it again. The purpose of this file is to pre-process and store the file in Embedding. Therefore, when switching to a new dataset, the old file needs to be deleted.\n\n\n## What if the data is not in CSV format?\nYou can try modifying the `data_preprocessing` function in `src/utils`.\n\n## Support Us\nIf you like this project and would like to [support us](https://www.buymeacoffee.com/explainthis), you can buy us a coffee. This will be the driving force for us to continue moving forward!\n\n[\u003ca href=\"https://www.buymeacoffee.com/explainthis\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"45px\" width=\"162px\" alt=\"Buy Me A Coffee\"\u003e\u003c/a\u003e](https://www.buymeacoffee.com/explainthis)\n\n## Related Projects\n- [hyperDB](https://github.com/jdagdelen/hyperDB)\n\n## License\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheexplainthis%2Fchatgpt-customer-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheexplainthis%2Fchatgpt-customer-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheexplainthis%2Fchatgpt-customer-service/lists"}