Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edd-Bot_GPT

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.

GPT Telegram Bot

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.

🚀 Features

  • 🧠 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).

🛠 Tech Stack

📂 Project Structure

.
├── 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.)

Requirements

Python 3.x installed

Install necessary Python packages using the requirements.txt file

pip install -r requirements.txt

Credentials

BOT_TOKEN: Your Telegram Bot Token which can be obtained from BotFather.
ChatGPT_TOKEN: Your OpenAI API Key, which can be found on the OpenAI Dashboard.

Usage

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:

  1. To add/change an environment variable permanently in Windows
  2. Launch "Control Panel"
  3. "System"
  4. "Advanced system settings"
  5. Switch to "Advanced" tab
  6. "Environment variables"
  7. Choose "System Variables" (for all users)
  8. 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".

About

Telegram-bot з підключенням ChatGPT.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages