Skip to main content

Telegram bot for chatting, text-to-image and text-to-voice conversions

Project description

License Python version PyPi Black Downloads wakatime

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

  1. From Source

Clone repo and install.

git clone https://github.com/Simatwa/pytgpt-bot.git
cd pytgpt-bot
pip install .
  1. 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

Commands

Usage Information

This section provides detailed instructions on how to use the various commands available in the bot.

  • /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.

  • /audio: 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.

  • any other text: An alias for /chat, allowing users to continue with chatting.

Administrative Commands

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytgpt_bot-0.1.0.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

pytgpt_bot-0.1.0-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page