Skip to content

Latest commit

Β 

History

History
97 lines (67 loc) Β· 2.25 KB

File metadata and controls

97 lines (67 loc) Β· 2.25 KB

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.