This Telegram Chatbot is a Python-based bot that allows users to engage in conversations with a Language Model (LLM) using the GPT4all python library and the python-telegram-bot library. This README provides an overview of the project and instructions on how to get started.
Before using the Telegram Chatbot, ensure you have the following:
- Python 3 installed on your system.
- The necessary Python libraries specified in the requirements.txt file. You can install them using
pip.
- Clone the repository to your local machine:
git clone https://github.com/Fatal3xcept10n/LLM-Telegram-Chatbot.git- Change directory to the project folder:
cd LLM-Telegram-Chatbot- Install the required Python libraries:
pip install -r requirements.txt- Generate a Telegram Bot API key:
- Visit the BotFather on Telegram to create your bot and obtain the API key.
- Create a file in the project folder named
apikey.py - Edit this file and include this single line, making sure to replace with your own API key
API_KEY = '[API key goes here]'
To start the bot, run the main.py file:
python main.pyYou can interact with the bot on Telegram using the following commands:
- /help: Display a help menu.
- /hello: Initiate a conversation with the bot.
- /stop: Stop the current conversation.
- /persistence: (Currently not functional) Toggle conversation persistence (coming soon).- The main command handling logic can be found in the commands.py file.
- You can modify and extend the commands to customize your bot's behavior.
In the chatbot.py file, you can customize the Language Model (LLM) used by the bot. You can also adjust LLM parameters and settings to suit your preferences.
Contributions are welcome! If you'd like to contribute to the project, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push them to your fork.
- Create a pull request with a detailed description of your changes.
This project is licensed under the MIT License. Feel free to use and modify it as needed.

