Skip to content

ChatGptBot: An AI-powered Telegram bot script for generating text based responses using OpenAI

Notifications You must be signed in to change notification settings

abirxdhack/ChatGptBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ChatGpt Telegram Bot 🌌

ChatGptBot: An AI-powered Telegram bot script for generating text-based responses using OpenAI

GitHub stars GitHub forks GitHub issues GitHub license GitHub pull requests PyPI - Python Version GitHub top language


🌟 Features

  • 🍪 Text Prompt Response: Accepts text prompts and generates text.

Requirements

Before you begin, ensure you have met the following requirements:

  • Python 3.9 or higher.
  • pyrogram, openai libraries.
  • A Telegram bot token (you can get one from @BotFather on Telegram).
  • API ID and Hash: You can get these by creating an application on my.telegram.org.
  • To Get GPT_API_KEY Open GPT_API_KEY.

Installation

To install pyrogram, openai run the following command:

pip install pyrogram openai

Note: If you previously installed pyrofork, uninstall it before installing pyrogram.

Configuration

  1. Open the config.py file in your favorite text editor.
  2. Replace the placeholders for API_ID, API_HASH, GPT_API_KEY, and BOT_TOKEN with your actual values:

Deploy the Bot

git clone https://github.com/abirxdhack/ChatGptBot
cd ChatGptBot
python main.py

Usage 🛠️

The bot supports the following commands:

  • /gpt <prompt>: Generates a response based on a provided text prompt.
  • .gpt <prompt>: Generates a response based on a provided text prompt.
  • /gpt4 <prompt>: Generates a response based on a provided text prompt.
  • .gpt4 <prompt>: Generates a response based on a provided text prompt.

Author 📝

About

ChatGptBot: An AI-powered Telegram bot script for generating text based responses using OpenAI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages