Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arc53/tg-bot-docsgpt-extenstion
DocsGPT extension to deploy telegram bots
https://github.com/arc53/tg-bot-docsgpt-extenstion
ai bot docsgpt gpt telegram
Last synced: about 2 months ago
JSON representation
DocsGPT extension to deploy telegram bots
- Host: GitHub
- URL: https://github.com/arc53/tg-bot-docsgpt-extenstion
- Owner: arc53
- License: mit
- Created: 2024-05-23T08:42:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-06T09:17:07.000Z (6 months ago)
- Last Synced: 2024-07-06T10:31:44.928Z (6 months ago)
- Topics: ai, bot, docsgpt, gpt, telegram
- Language: Python
- Homepage: https://www.docsgpt.cloud/
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram DocsGPT extension
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](https://www.docsgpt.cloud/).
## Features
- Responds to user queries with intelligent answers using DocsGPT.
- Maintains conversation history for context-aware responses.
- Easily deployable using Docker.## Prerequisites
Before you begin, ensure you have met the following requirements:
- You have registered a bot with [BotFather](https://core.telegram.org/bots#botfather) on Telegram and obtained a `TOKEN`.
- You have created an API key on [DocsGPT](https://www.docsgpt.cloud/) to access your AI's data and prompt.## Installation
### Using Python
1. Clone the repository:
```bash
git clone https://github.com/arc53/tg-bot-docsgpt-extenstion.git
cd tg-bot-docsgpt-extenstion
```2. Set up a virtual environment:
```bash
python3 -m venv venv
```
- On macOS and Linux:
```bash
source venv/bin/activate
```
- On Windows:
```bash
.\venv\Scripts\activate
```3. Install dependencies:
```bash
pip install -r requirements.txt
```4. Create a `.env` file in the project directory and add your environment variables:
```plaintext
TELEGRAM_BOT_TOKEN=
API_KEY=
```5. Run the bot:
```bash
python bot.py
```### Using Docker
1. Clone the repository:
```bash
git clone https://github.com/arc53/tg-bot-docsgpt-extenstion.git
cd tg-bot-docsgpt-extenstion
```2. Build the Docker image:
```bash
docker build -t telegram-gpt-bot .
```3. Create a `.env` file in the project directory and add your environment variables:
```plaintext
TELEGRAM_BOT_TOKEN=
API_KEY=
```4. Run the Docker container:
```bash
docker run --env-file .env telegram-gpt-bot
```## Usage
### Telegram Commands
- `/start` - Initiates the conversation with the bot.
- `/help` - Provides help information.### General Conversation
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`.## File Description
- `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).## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.## Acknowledgments
- [DocsGPT](https://www.docsgpt.cloud/)
- [DocsGPT Github](https://github.com/arc53/docsgpt)
- [Telegram Bot API](https://core.telegram.org/bots/api)
- [Python Telegram Bot](https://python-telegram-bot.readthedocs.io/)