Skip to content

HodaSadatJafari/balebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BaleBot

Bale Messenger OpenAI Integration

A robust, AI-powered bot for Bale messenger that leverages language models to provide English language assistance.

🚀 Features

  • English word definitions and explanations
  • Synonym and antonym suggestions
  • Example usage in sentences
  • Powered by OpenAI's language models
  • Simple, user-friendly interface

📋 Requirements

  • Python 3.6+
  • Bale messenger account
  • OpenAI API key (or compatible LLM provider)

🛠️ Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/balebot.git
    cd balebot
  2. Install dependencies:

    pip install -r requirements.txt

⚙️ Configuration

Create a .env file in the project root with the following variables:

BOT_TOKEN=your_bale_bot_token
OPENAI_API_KEY=your_openai_api_key
OPENAI_BASE_URL=https://api.openai.com/v1

Getting the Required Keys

  1. Bale Bot Token:

    • Open Bale messenger
    • Start a chat with @BotFather
    • Follow instructions to create a new bot
    • Copy the provided token
  2. OpenAI API Key:

    • Register at OpenAI
    • Navigate to API keys section
    • Generate a new API key

🚀 Usage

The repository contains three sample implementations:

  • sample1.py: Basic bot implementation
  • sample2.py: Intermediate features
  • main.py: Full-featured English language assistant

To run the main bot:

python main.py

User Interaction

  1. Start a chat with your bot in Bale messenger
  2. Enter an English word
  3. Select from available options:
    • Get definition
    • Find synonyms/antonyms
    • See example sentences
    • And more...

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgements


Note: This bot is not officially affiliated with Bale or OpenAI.

About

A bot for Bale messenger (similar to Telegram)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages