A robust, AI-powered bot for Bale messenger that leverages language models to provide English language assistance.
- English word definitions and explanations
- Synonym and antonym suggestions
- Example usage in sentences
- Powered by OpenAI's language models
- Simple, user-friendly interface
- Python 3.6+
- Bale messenger account
- OpenAI API key (or compatible LLM provider)
-
Clone the repository:
git clone https://github.com/yourusername/balebot.git cd balebot -
Install dependencies:
pip install -r requirements.txt
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
-
Bale Bot Token:
- Open Bale messenger
- Start a chat with @BotFather
- Follow instructions to create a new bot
- Copy the provided token
-
OpenAI API Key:
- Register at OpenAI
- Navigate to API keys section
- Generate a new API key
The repository contains three sample implementations:
sample1.py: Basic bot implementationsample2.py: Intermediate featuresmain.py: Full-featured English language assistant
To run the main bot:
python main.py- Start a chat with your bot in Bale messenger
- Enter an English word
- Select from available options:
- Get definition
- Find synonyms/antonyms
- See example sentences
- And more...
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Bale Messenger for their bot API
- OpenAI for their language model API
Note: This bot is not officially affiliated with Bale or OpenAI.