This repository contains the source code for a Telegram bot that leverages DocsGPT to provide intelligent responses to user queries. This bot is an extension for DocsGPT.
- Responds to user queries with intelligent answers using DocsGPT.
- Maintains conversation history for context-aware responses.
- Easily deployable using Docker.
Before you begin, ensure you have met the following requirements:
- You have registered a bot with BotFather on Telegram and obtained a
TOKEN
. - You have created an API key on DocsGPT to access your AI's data and prompt.
-
Clone the repository:
git clone https://github.com/arc53/tg-bot-docsgpt-extenstion.git cd tg-bot-docsgpt-extenstion
-
Set up a virtual environment:
python3 -m venv venv
- On macOS and Linux:
source venv/bin/activate
- On Windows:
.\venv\Scripts\activate
- On macOS and Linux:
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the project directory and add your environment variables:TELEGRAM_BOT_TOKEN=<your-telegram-bot-token> API_KEY=<your-api-key>
-
Run the bot:
python bot.py
-
Clone the repository:
git clone https://github.com/arc53/tg-bot-docsgpt-extenstion.git cd tg-bot-docsgpt-extenstion
-
Build the Docker image:
docker build -t telegram-gpt-bot .
-
Create a
.env
file in the project directory and add your environment variables:TELEGRAM_BOT_TOKEN=<your-telegram-bot-token> API_KEY=<your-api-key>
-
Run the Docker container:
docker run --env-file .env telegram-gpt-bot
/start
- Initiates the conversation with the bot./help
- Provides help information.
Simply type any message, and the bot will respond with an intelligent answer based on the context of the conversation maintained in context.chat_data
.
bot.py
: The main script for running the bot.requirements.txt
: Python dependencies required by the bot.Dockerfile
: Instructions to build the Docker image..env
: File containing environment variables (not included, must be created).
This project is licensed under the MIT License - see the LICENSE file for details.