{"id":19156649,"url":"https://github.com/kkdai/linebot-template-openai","last_synced_at":"2025-05-07T07:45:44.301Z","repository":{"id":205987921,"uuid":"715107326","full_name":"kkdai/linebot-template-openai","owner":"kkdai","description":"OpenAI Chatbot Integration with LINE Messaging API","archived":false,"fork":false,"pushed_at":"2023-11-07T15:42:24.000Z","size":6,"stargazers_count":6,"open_issues_count":0,"forks_count":40,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T20:17:22.008Z","etag":null,"topics":["linebot","openai","python"],"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/kkdai.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":"2023-11-06T13:48:19.000Z","updated_at":"2024-12-13T08:52:44.000Z","dependencies_parsed_at":"2023-11-10T21:45:54.734Z","dependency_job_id":null,"html_url":"https://github.com/kkdai/linebot-template-openai","commit_stats":null,"previous_names":["kkdai/linebot-template-openai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Flinebot-template-openai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Flinebot-template-openai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Flinebot-template-openai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkdai%2Flinebot-template-openai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkdai","download_url":"https://codeload.github.com/kkdai/linebot-template-openai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252838649,"owners_count":21812080,"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":["linebot","openai","python"],"created_at":"2024-11-09T08:35:21.284Z","updated_at":"2025-05-07T07:45:44.293Z","avatar_url":"https://github.com/kkdai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Chatbot Integration with LINE Messaging API\n\nThis repository contains a Python-based FastAPI application that integrates OpenAI's ChatGPT with the LINE Messaging API.\n\n## Overview\n\nThe application uses the OpenAI API to generate responses to user messages sent via LINE. The integration is done using FastAPI and the LINE Messaging API.\n\n## Prerequisites\n\nTo run this application, you will need:\n\n- Python 3.6 or later\n- An OpenAI account with API key\n- LINE Messaging API Channel with a Channel Secret and Channel Access Token\n\n## Installation\n\n1. Clone this repository:\n\n```bash\ngit clone https://github.com/your-repository.git\n```\n\n2. Navigate to the project directory:\n\n```bash\ncd your-repository\n```\n\n3. Install the required packages:\n\n```bash\npip install -r requirements.txt\n```\n\n## Configuration\n\nCreate a `.env` file in the project root directory with the following variables:\n\n```env\nOPENAI_API_KEY=your_openai_api_key\nChannelSecret=your_line_channel_secret\nChannelAccessToken=your_line_channel_access_token\n```\n\nReplace `your_openai_api_key`, `your_line_channel_secret`, and `your_line_channel_access_token` with your actual OpenAI API key, LINE Channel Secret, and LINE Channel Access Token respectively.\n\n## Usage\n\nRun the FastAPI application:\n\n```bash\nuvicorn main:app --reload\n```\n\nThe application will start on `http://localhost:8000/`.\n\n## API Endpoints\n\n- POST `/callback`: Handles incoming requests from the LINE Messaging API.\n\n## Deploy this on Web Platform\n\nYou can choose [Heroku](https://www.heroku.com/) or [Render](http://render.com/)\n\n### Deploy this on Heroku\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n- Input `Channel Secret` and `Channel Access Token`.\n- Input [OpenAI API Key](https://platform.openai.com/account/api-keys) in `OPENAI_API_KEY`.\n- Remember your heroku, ID\n\n### Deploy this on Render.com\n\n[![Deploy to Render](http://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy)\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0. For more information, see the [LICENSE](https://www.apache.org/licenses/LICENSE-2.0) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkdai%2Flinebot-template-openai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkdai%2Flinebot-template-openai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkdai%2Flinebot-template-openai/lists"}