Telegram bot for chatting, text-to-image and text-to-speech conversions
Project description
Welcome to pytgpt-bot
This is a Telegram bot based on 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.
Prerequisites
Installation
- From Source
Clone repo and install.
git clone https://github.com/Simatwa/pytgpt-bot.git
cd pytgpt-bot
pip install .
- From Pypi (recommended)
pip install pytgpt-bot
Usage
Before getting started, ensure you've your Telegram bot token. If that's not the case then purpose to secure one from @BotFather.
Proceed to fill the env configuration file as per the needs and then rename it .env
before firing up the bot python3 run.py
.
Alternatively, using CLI:
$ pytgpt-bot run <Your Telegram Token>
Features
-
/start: Displays the help information, offering a comprehensive list of available commands and their functionalities. This command is essential for users to quickly understand how to interact with the bot.
-
/chat: Initiate a natural language conversation with the AI. This command allows users to engage in interactive dialogues, ask questions, or make requests.
-
/image: Generates images from textual descriptions using the default provider. This feature enables users to visualize ideas or concepts through images.
-
/prodia: Generates images from textual descriptions using the Prodia provider. This command offers a unique style or interpretation of the text descriptions compared to the default method.
-
/speak: Converts text to speech, providing users with the ability to listen to descriptions, instructions, or any text content read out by the AI.
-
/intro: Sets a new text for the chat intro. This command allows users to customize the chat introductory prompt which serves as a guide in the human-AI engagement.
-
/voice: Sets a new voice for speech synthesis. This command enables users to choose from different voices for the AI to use when generating audio from text.
-
/provider: Sets a new chat provider. This command allows users to switch between different providers for various functionalities, such as
phind
,llama2
,koboldai
etc. -
/awesome: Sets predefined prompt as
chat intro
. Browse over 200 of them. -
/history: Provides users with the ability to view the history of their chats with the bot. This command is useful for reviewing past interactions or finding specific information from previous conversations.
-
/check: Offers an overview of the bot's current configuration, including any custom settings applied by the user.
-
/reset: Resets the chat history and starts a new conversation thread. This command is useful for users who wish to start fresh or clear their chat history for privacy reasons.
-
/myid: Echoes the user's Telegram ID. This command is useful for users who need to know their Telegram ID for various purposes, such as setting up bot admin.
-
/suspend: Pauses the bot's service temporarily. This command is useful for channel administrators who need to temporarily halt the bot's operations without deleting its data or settings. It's a way to manage the bot's availability based on operational needs.
-
/resume: Resumes the bot's service after it has been suspended. This command allows administrators to quickly bring the bot back online after a pause, ensuring that users can continue interacting with the bot without interruption.
-
any other text
: An alias for/chat
, allowing users to continue with chatting.
Administrative Commands
-
/clear
: Clears all chats. This command is used to remove all chat data from the bot's database. It's a powerful command that should be used with caution, as it will delete all chat history. -
/total
: Shows the total number of chats available. This command provides an overview of the current chat data stored in the bot's database, helping administrators understand the volume of interactions the bot has had. -
/drop
: Clears the entire chat table and bot logs. Similar to/clear
, this command removes all data from the chat table in the database. It's a more drastic measure than/clear
, as it completely wipes out all chat data and current contents of log file. -
/sql
: Allows running SQL statements against the database. This command provides a way for administrators to directly interact with the bot's database using SQL queries. It's a powerful tool for managing and analyzing the bot's data but should be used with caution to avoid unintended data loss or corruption. -
/logs
: Checks the logs. This command is used to access the bot's logs, which can provide insights into the bot's activity, errors, and user interactions. It's a valuable tool for monitoring and troubleshooting the bot's performance.
Support and Feedback
If 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.
License
pytgpt-bot
is open-source and available under the MIT License. Feel free to use, modify, and distribute the code as you see fit.
Thank you for using pytgpt-bot
. Enjoy your AI-powered interactions!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytgpt_bot-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b2ec21c39a71dc85854d218e77d39216d05b2cd02bc3e7aca6036aa56de904b |
|
MD5 | 2b963656c9bc19b56b8d09788013b77f |
|
BLAKE2b-256 | bd4b2117f103f7cd3e676237d03579f203c60767c05e9156d19c3cc9923ab01b |