{"id":16317041,"url":"https://github.com/simatwa/pytgpt-bot","last_synced_at":"2025-07-17T06:34:34.494Z","repository":{"id":235765942,"uuid":"791201698","full_name":"Simatwa/pytgpt-bot","owner":"Simatwa","description":"Telegram bot for chatting, text-to-image and text-to-speech conversions.","archived":false,"fork":false,"pushed_at":"2024-11-13T15:25:07.000Z","size":87,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T09:28:55.037Z","etag":null,"topics":["ai","bot","chatbot","pytelegrambot","pytelegrambotapi","pytgpt","tgpt"],"latest_commit_sha":null,"homepage":"https://t.me/pytgpt_bot","language":"Python","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/Simatwa.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":"2024-04-24T09:24:07.000Z","updated_at":"2024-11-13T15:25:11.000Z","dependencies_parsed_at":"2024-07-09T13:07:46.125Z","dependency_job_id":null,"html_url":"https://github.com/Simatwa/pytgpt-bot","commit_stats":{"total_commits":64,"total_committers":1,"mean_commits":64.0,"dds":0.0,"last_synced_commit":"fb80db42a691250f29a8bfc19907a8ad46950cb8"},"previous_names":["simatwa/pytgpt-bot"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/Simatwa/pytgpt-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2Fpytgpt-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2Fpytgpt-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2Fpytgpt-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2Fpytgpt-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simatwa","download_url":"https://codeload.github.com/Simatwa/pytgpt-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simatwa%2Fpytgpt-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265573572,"owners_count":23790466,"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":["ai","bot","chatbot","pytelegrambot","pytelegrambotapi","pytgpt","tgpt"],"created_at":"2024-10-10T22:06:26.342Z","updated_at":"2025-07-17T06:34:34.471Z","avatar_url":"https://github.com/Simatwa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/Simatwa/pytgpt-bot/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/static/v1?logo=MIT\u0026color=Blue\u0026message=MIT\u0026label=License\"/\u003e\u003c/a\u003e\n\u003ca href=\"#\"\u003e\u003cimg alt=\"Python version\" src=\"https://img.shields.io/pypi/pyversions/pytgpt-bot\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/pytgpt-bot\"\u003e\u003cimg alt=\"PyPi\" src=\"https://img.shields.io/pypi/v/pytgpt-bot?color=green\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://pepy.tech/project/pytgpt-bot\"\u003e\u003cimg src=\"https://static.pepy.tech/personalized-badge/pytgpt-bot?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=green\u0026left_text=Downloads\" alt=\"Downloads\"\u003e\u003c/a\u003e\n\u003c!--\n\u003ca href=\"https://github.com/Simatwa/pytgpt-bot/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/Simatwa/pytgpt-bot?color=success\u0026label=Release\u0026logo=github\" alt=\"Latest release\"\u003e\u003c/img\u003e\u003c/a\u003e \n--\u003e\n\u003ca href=\"https://hits.seeyoufarm.com\"\u003e\u003cimg src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com/Simatwa/pytgpt-bot\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://wakatime.com/badge/github/Simatwa/pytgpt-bot\"\u003e\u003cimg src=\"https://wakatime.com/badge/github/Simatwa/pytgpt-bot.svg\" alt=\"wakatime\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\nWelcome to \u003ca href=\"https://t.me/pytgpt_bot\"\u003epytgpt-bot\u003c/a\u003e\n\u003c/h1\u003e\n\nThis is a Telegram bot based on [python-tgpt](https://github.com/Simatwa/python-tgpt), a powerful tool designed to enhance your interactions with AI. This bot is built on the robust foundation of the `pyTelegramBotAPI` and offers a wide range of features to make your experience with AI more engaging and interactive. Whether you're looking to chat with AI, generate images and audio from text, `pytgpt-bot` has got you covered.\n\n## Prerequisites\n\n- [x] [Python\u003e=3.10](https://python.org)\n\n## Installation\n\n1. From Source\n\nClone repo and install.\n\n```bash\ngit clone https://github.com/Simatwa/pytgpt-bot.git\ncd pytgpt-bot\npip install .\n```\n\n2. From Pypi *(recommended)*\n\n```sh\npip install pytgpt-bot\n```\n\n## Usage\n\nBefore getting started, ensure you've your Telegram bot token. If that's not the case then purpose to secure one from [@BotFather](https://telegram.me/BotFather).\n\nProceed to fill the [env](env) configuration file as per the needs and then rename it `.env` before firing up the bot `python3 run.py`.\n\nAlternatively, using CLI:\n\n   `$ pytgpt-bot run \u003cYour Telegram Token\u003e`\n\n## Features\n\n### Access Commands\n\n- **/start**: This command shows you how to use the bot. It's like a guidebook for all the commands and what they do.\n\n- **/chat**: Use this to talk to the AI. You can ask questions, make requests, or just chat about anything.\n\n- **/image**: Want to see what something looks like? Type a description, and this command will create an image for you.\n\n- **/prodia**: Similar to `/image`, but it gives you a different style of image.\n\n- **/speak**: If you prefer listening to text instead of reading it, use this command to have the AI read out text for you.\n\n- **/intro**: Sets a new text for the chat intro.\n\n- **/voice**: Choose how the AI's voice sounds when it reads out text.\n\n- **/provider**: Switch between different AI providers for various features.\n\n- **/awesome**: Browse through a selection of cool chat intros.\n\n- **/history**: See past conversations with the bot.\n\n- **/check**: See what settings are currently active for your bot.\n\n- **/reset**: Start a new conversation from scratch.\n\n- **/myid**: Find out your Telegram ID.\n\n- **/suspend**: Temporarily stop the bot from responding.\n\n- **/resume**: Restart the bot after it's been suspended.\n\n- **Any other text**: Just type anything to continue chatting.\n\n### Administrative Commands\n\n- **/clear**: Remove all chat data from the bot's database. Be careful with this one!\n\n- **/total**: See how many chats the bot has had.\n\n- **/drop**: Delete everything from the chat table and bot logs. This is more extreme than `/clear`.\n\n- **/sql**: Run SQL queries on the bot's database. Use this with caution!\n\n- **/logs**: Check the bot's logs for activity, errors, and user interactions.\n\n- `any other text`: An alias for `/chat`, allowing users to continue with chatting.\n\n\u003e [!TIP]\n\u003e For a better understanding of these commands, try interacting with a running bot from [@pytgpt_bot](https://t.me/pytgpt_bot). This can give you a practical idea of how the bot works and how to use it effectively.\n\n### Administrative Commands\n\n- **/clear**: Use this command to remove all chat data from the bot's database. It's a powerful tool, so use it carefully to avoid losing important data.\n\n- **/total**: This command shows you the total number of chats the bot has handled. It's a quick way to see how much interaction the bot has had.\n\n- **/drop**: If you need to completely wipe out all chat data and logs, use this command. It's more extreme than `/clear` and should be used with caution to avoid losing all data.\n\n- **/sql**: Want to directly interact with the bot's database? This command lets you run SQL queries. It's a powerful feature for managing and analyzing data, but be cautious to avoid mistakes.\n\n- **/logs**: This command gives you access to the bot's logs. It's useful for monitoring the bot's activity, spotting errors, and understanding user interactions.\n\n\u003e [!IMPORTANT]\n\u003e Administrative commands are restricted to the users whose Telegram IDs are specified in the [.env](https://github.com/Simatwa/pytgpt-bot/blob/308f6079d153a429c445649896840fdc7cbfac11/env#L12) file.\n\n## Further Tips\n\n- The bot features inline query for text generation. The query must end with *three ellipsis* `...`. Remember to enable the mode from [@BotFather](https://t.me/pytgpt_bot). `/setinline`\n- You can as well add the bot to a Telegram channel. Grant it read and delete permissions. The access commands will still work out. `@bot_username \u003ctext\u003e` will trigger **text generation**.\n- Channel Admin will control the bot access using the `/suspend` and `/resume` commands. *(Experimental).*\n\n## Support and Feedback\n\nIf you have any questions, feedback, or suggestions for `pytgpt`, please feel free to reach out. Your input is valuable in helping us improve and expand the bot's capabilities.\n\n## License\n\n`pytgpt-bot` is open-source and available under the [MIT License](LICENSE). Feel free to use, modify, and distribute the code as you see fit.\n\n---\n\nThank you for using `pytgpt-bot`. Enjoy your AI-powered interactions!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimatwa%2Fpytgpt-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimatwa%2Fpytgpt-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimatwa%2Fpytgpt-bot/lists"}