Edd-Bot_GPT bot is a simple and easy-to-use conversational AI-assistant.
It provides the ability to interact with the bot, ask any questions, communicate with some famous people, and play a quiz on three topics: Python programming, Mathematical theories and Biology topic and translate the text.
A feature-rich Telegram bot integrated with OpenAI's GPT model. This bot allows users to interact with AI in various modes, including general chat, quizzes, and simulated conversations with famous historical figures.
- 🧠 ChatGPT Mode: Have a general conversation with the AI on any topic.
- 🗣️ Talk with Famous People: Simulate a conversation with iconic personalities:
- Kurt Cobain
- Stephen Hawking
- Friedrich Nietzsche
- Queen Elizabeth II
- J.R.R. Tolkien
- ❓ Quiz Mode: Test your knowledge with an interactive quiz generated by AI.
- 🎲 Random Fact: Get a random interesting fact about the world.
- 📝 Translator: Translate text between languages (if configured).
- Language: Python
- Framework: python-telegram-bot
- AI Provider: OpenAI API (GPT-3.5/4)
- Environment Management: python-dotenv
.
├── bot.py # Main entry point for the Telegram bot
├── gpt.py # Wrapper class for OpenAI API interactions
├── util.py # Utility functions for Telegram messages and menus
├── requirements.txt # List of project dependencies
├── .env.example # Example environment variables file
└── resources/ # Static assets
├── images/ # Images for different bot modes (avatars, headers)
├── messages/ # Text messages for bot responses
└── prompts/ # System prompts for GPT personas (Cobain, Hawking, etc.)
Python 3.x installed
Install necessary Python packages using the requirements.txt file
pip install -r requirements.txt
PyCharm:
set in .env file:
- BOT_TOKEN="your_telegram_token"
- ChatGPT_TOKEN="your_openai_token"
Linux:
- export BOT_TOKEN=your_telegram_token
- export ChatGPT_TOKEN=your_openai_token
Windows:
- To add/change an environment variable permanently in Windows
- Launch "Control Panel"
- "System"
- "Advanced system settings"
- Switch to "Advanced" tab
- "Environment variables"
- Choose "System Variables" (for all users)
- To add a new environment variable:
- Choose "New"
- Enter the variable "BOT_TOKEN" and "your_telegram_token".
- Enter the variable "ChatGPT_TOKEN" and "your_openai_token".