{"id":13423921,"url":"https://github.com/m1guelpf/chatgpt-telegram","last_synced_at":"2025-04-13T02:00:02.230Z","repository":{"id":64191314,"uuid":"573982889","full_name":"m1guelpf/chatgpt-telegram","owner":"m1guelpf","description":"Run your own GPTChat Telegram bot, with a single command!","archived":false,"fork":false,"pushed_at":"2023-04-10T07:55:38.000Z","size":41,"stargazers_count":3903,"open_issues_count":58,"forks_count":562,"subscribers_count":34,"default_branch":"main","last_synced_at":"2025-04-13T01:59:57.036Z","etag":null,"topics":["gpt-3","gptchat","openai","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m1guelpf.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}},"created_at":"2022-12-04T03:19:47.000Z","updated_at":"2025-04-12T12:28:05.000Z","dependencies_parsed_at":"2024-01-13T00:38:32.110Z","dependency_job_id":"160b628e-5e0b-4cd3-8aea-bf011dee076c","html_url":"https://github.com/m1guelpf/chatgpt-telegram","commit_stats":{"total_commits":13,"total_committers":6,"mean_commits":"2.1666666666666665","dds":"0.46153846153846156","last_synced_commit":"49dd1705127894b7892633c5b1e54b27d6ca5e83"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1guelpf%2Fchatgpt-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1guelpf%2Fchatgpt-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1guelpf%2Fchatgpt-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1guelpf%2Fchatgpt-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m1guelpf","download_url":"https://codeload.github.com/m1guelpf/chatgpt-telegram/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654046,"owners_count":21140235,"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":["gpt-3","gptchat","openai","telegram-bot"],"created_at":"2024-07-31T00:00:45.011Z","updated_at":"2025-04-13T02:00:02.209Z","avatar_url":"https://github.com/m1guelpf.png","language":"Go","funding_links":[],"categories":["Go","Uncategorized","Languages","Bots","Chatbots","Official Resources","Bots and tools","Integrations","A01_文本生成_文本对话","Chat bots","Large Language Model","Applications and Demos","Thanks to all the contributors!","telegram","UIs","在任何地方使用 ChatGPT"],"sub_categories":["Uncategorized","Golang","Examples","Access ChatGPT from other platforms","Telegram","大语言对话模型及数据","Other","ChatGPT Apps","LLM (Large Language Model)","Command-line(shell) interface","聊天機器人"],"readme":"# ChatGPT-bot\n\n\u003e Interact with ChatGPT\n\nGo CLI to fuels a Telegram bot that lets you interact with [ChatGPT](https://openai.com/blog/chatgpt/), a large language model trained by OpenAI.\n\n## Installation\nDownload the file corresponding to your OS in the [releases page](https://github.com/m1guelpf/chatgpt-telegram/releases/latest). \n- `chatgpt-telegram-Darwin-amd64`: macOS (Intel)\n- `chatgpt-telegram-Darwin-arm64`: macOS (M1)\n- `chatgpt-telegram-Linux-amd64`: Linux\n- `chatgpt-telegram-Linux-arm64`: Linux (ARM)\n- `chatgpt-telegram-Win-amd64`: Windows\n\nAfter you download the file, extract it into a folder and open the `env.example` file with a text editor and fill in your credentials. \n- `TELEGRAM_TOKEN`: Your Telegram Bot token\n  - Follow [this guide](https://core.telegram.org/bots/tutorial#obtain-your-bot-token) to create a bot and get the token.\n- `TELEGRAM_ID` (Optional): Your Telegram User ID\n  - If you set this, only you will be able to interact with the bot.\n  - To get your ID, message `@userinfobot` on Telegram.\n  - Multiple IDs can be provided, separated by commas.\n- `EDIT_WAIT_SECONDS` (Optional): Amount of seconds to wait between edits\n  - This is set to `1` by default, but you can increase if you start getting a lot of `Too Many Requests` errors.\n- Save the file, and rename it to `.env`.\n\u003e **Note** Make sure you rename the file to _exactly_ `.env`! The program won't work otherwise.\n\nFinally, open the terminal in your computer (if you're on windows, look for `PowerShell`), navigate to the path you extracted the above file (you can use `cd dirname` to navigate to a directory, ask ChatGPT if you need more assistance 😉) and run `./chatgpt-telegram`.\n\n### Running with Docker\n\nIf you're trying to run this on a server with an existing Docker setup, you might want to use our Docker image instead.\n\n```sh\ndocker pull ghcr.io/m1guelpf/chatgpt-telegram\n```\n\nHere's how you'd set things up with `docker-compose`:\n\n```yaml\nservices:\n  chatgpt-telegram:\n    image: ghcr.io/m1guelpf/chatgpt-telegram\n    container_name: chatgpt-telegram\n    volumes:\n      # your \".config\" local folder must include a \"chatgpt.json\" file\n      - .config/:/root/.config\n    environment:\n      - TELEGRAM_ID=\n      - TELEGRAM_TOKEN=\n```\n\n\u003e **Note** The docker setup is optimized for the Browserless authentication mechanism, described below. Make sure you update the `.config/chatgpt.json` file in this repo with your session token before running.\n\n## Authentication\n\nBy default, the program will launch a browser for you to sign into your account, and close it once you're signed in. If this setup doesn't work for you (there are issues with the browser starting, you want to run this in a computer with no screen, etc.), you can manually extract your session from your browser instead.\n\nTo do this, first sign in to ChatGPT on your browser, then open the Developer Tools (right click anywhere in the page, then click \"Inspect\"), click on the Application tab and then on the Cookies section, and copy the value of the `__Secure-next-auth.session-token` cookie.\n\nYou will then have to create a config file in the following location depending on your OS (replace `YOUR_USERNAME_HERE` with your username:\n\n- `~/.config/chatgpt.json`: Linux\n- `C:\\Users\\YOUR_USERNAME_HERE\\AppData\\Roaming\\chatgpt.json`: Windows\n- `/Users/YOUR_USERNAME_HERE/Library/Application Support/chatgpt.json`: macOS\n\n\u003e **Note** If you have already run the program, the file should exist but be empty. If it doesn't exist yet, you can either run the program or manually create it.\n\nFinally, add your cookie to the file and save it. It should look like this: `{ \"openaisession\": \"YOUR_COOKIE_HERE\" }`.\n\n## License\n\nThis repository is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1guelpf%2Fchatgpt-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm1guelpf%2Fchatgpt-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1guelpf%2Fchatgpt-telegram/lists"}