{"id":26582943,"url":"https://github.com/capybara003/telegram-chatbot","last_synced_at":"2026-04-16T13:33:43.185Z","repository":{"id":281890958,"uuid":"946515388","full_name":"Capybara003/Telegram-chatbot","owner":"Capybara003","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T09:07:57.000Z","size":346,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T17:54:10.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Capybara003.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}},"created_at":"2025-03-11T09:06:01.000Z","updated_at":"2025-03-11T09:08:07.000Z","dependencies_parsed_at":"2025-03-11T17:54:31.501Z","dependency_job_id":"87726b5a-6874-4657-a3bc-5196b1f2ab04","html_url":"https://github.com/Capybara003/Telegram-chatbot","commit_stats":null,"previous_names":["capybara003/telegram-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FTelegram-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FTelegram-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FTelegram-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FTelegram-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Capybara003","download_url":"https://codeload.github.com/Capybara003/Telegram-chatbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245072911,"owners_count":20556458,"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":"2025-03-23T08:19:07.603Z","updated_at":"2026-04-16T13:33:43.135Z","avatar_url":"https://github.com/Capybara003.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TeleGPT\n\n[API Docs](https://icystudio.github.io/TeleGPT/telegpt_core) | [Releases](https://github.com/IcyStudio/TeleGPT/releases) | [Twitter](https://twitter.com/unixzii)\n\n![Hero](./artworks/hero.png)\n\nAn out-of-box ChatGPT bot for Telegram.\n\nTeleGPT is a Telegram bot based on [**teloxide**](https://github.com/teloxide/teloxide) framework and [**async_openai**](https://github.com/64bit/async-openai). It provides an easy way to interact with the latest ChatGPT models utilizing your own API key.\n\n## Features\n\n🦀 **Lightning fast** with pure Rust codebase.  \n📢 **All types of chat** (private and group) supports.  \n🚀 **Live streaming tokens** to your message bubble.  \n⌨️ **Telegram-flavoured Markdown** rendering supports.  \n💸 **Token usage** statistic recording and queryable via commands.  \n⚙️ **Fully customizable** with file-based configuration.  \n✋ **Admin features** (Beta) and user access control supports.\n\n## Getting TeleGPT\n\n### Docker\n\nWe recommend you to use the prebuilt docker image when deploying a dedicated server, it is published through GitHub Container Registry by GitHub Action. Currently, machines with amd64 architecture are supported.\n\n1. Sign in to GitHub Container Registry (needed if unauthorized when pull):\n\n```shell\ndocker login -u your_github_username -p your_personal_access_token https://ghcr.io\n```\n\n2. Create a `config.json` file with the template:\n\n```shell\ncp config.json.example config.json\n```\n\nFollow the instructions below to fill in tokens in `config.json`.\n\n- Get Telegram Bot tokens: [https://core.telegram.org/bots/tutorial](https://core.telegram.org/bots/tutorial)\n- Get OpenAI API tokens: [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)\n\n3. Start the docker container:\n\n```shell\ndocker-compose up -d # start the container\n```\n\nOther commands you may find useful:\n\n```shell\ndocker-compose logs -f # check the logs, press ctrl+c to stop viewing\ndocker-compose down # stop the container\ndocker-compose pull # pull the latest image\n```\n\n### Download from release\n\nTo deploy or test in-house, you can download the pre-built binary directly from the [releases](https://github.com/IcyStudio/TeleGPT/releases) page. Currently, Linux and macOS (Intel and Apple Silicon) hosts are supported.\n\n### Build from source\n\nClone the repository and run:\n\n```shell\n$ cargo build --release\n```\n\n## Usage\n\nYou need to create a configuration file before running the bot. The program reads `telegpt.config.json` from your current working directory by default, and you can also specify the config file path via `-c` option.\n\nThe configuration is described in this [doc](https://icystudio.github.io/TeleGPT/telegpt_core/config/), and here is an example:\n\n```json\n{\n  \"openaiAPIKey\": \"sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n  \"botToken\": \"8888888888:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n  \"adminUsernames\": [\"cyandev\"],\n  \"conversationLimit\": 30,\n  \"databasePath\": \"./path/to/telegpt.sqlite\",\n  \"i18n\": {\n    \"resetPrompt\": \"I’m ready for a new challenge. What can I do for you now?\"\n  }\n}\n```\n\nTo start the bot, simply run:\n\n```shell\n$ /path/to/telegpt\n```\n\nWhen you see the message `Bot is started`, you are ready to go!\n\n### Enable the verbose logging\n\n\u003e **Note:** Users' input will be logged in `DEBUG` level. To protect user privacy, please don't enable it in the production environment.\n\nFor debugging purpose, you can enable the verbose logs by setting `RUST_LOG` environment variable. For example:\n\n```shell\n$ RUST_LOG=TRACE /path/to/telegpt\n```\n\n### Admin Features (Beta)\n\n\u003e This feature depends on database to store the configurations. To ensure your data will not be lost after relaunching, you need to set a database path in the config file.\n\nThe bot has some basic admin features built-in. You can control who are allowed to use the bot, and dynamically change the member list via a set of commands.\n\nBy default, the bot is available for public use. It means everybody who adds it can chat with it, which may heavily cost your tokens. If you want to deploy and use the bot only within a small group of people, send `/set_public off` command to make the bot private. When you want to make it public again, send `/set_public on`.\n\nWhen the bot is in private mode, only admin users and invited members can chat with it. You can add or delete members via `/add_member` and `/del_member` command. The argument is **username**. For example: `/add_member cyandev`.\n\nCurrently, only admin users can use admin commands, other member users are not allowed to use them.\n\n### Database\n\nThe bot will use SQLite database to store some data produced during runtime. By default, if you don't provide a local file path, the data will be stored in memory database. When you restart the bot, all previous data (such as added members) will be lost. We recommend you to use the file-based database for usability.\n\n## Roadmap\n\nTeleGPT will be actively maintained recently, there are some planned features that are in development.\n\n- [ ] Retry with exponential backoff.\n- [ ] Conversation presets.\n- [ ] More user-friendly interface for admin operations.\n- [ ] Remote controlling with HTTP APIs.\n\n## Contribution\n\nIssues and PRs are welcomed. Before submitting new issues or PRs, it's better to check the existing ones first. Discussions and feature requests are nice to have before you start working on something.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Ftelegram-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapybara003%2Ftelegram-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Ftelegram-chatbot/lists"}