Murray is an AI-powered Discord bot that monitors and analyzes official FIA Formula 1 documents in real-time. Named in honor of Murray Walker, this bot answers questions by providing intelligent answers to questions about F1 regulations, decisions, and technical documents.
- Real-time Document Monitoring: Automatically fetches and processes new FIA documents as they're published
- Intelligent Q&A: Uses AnythingLLM to provide context-aware answers about F1 regulations and decisions
- Discord Integration: Seamlessly integrates with Discord for easy access to F1 document insights
- Document Management: Automatically organizes, vectorizes and embeds new documents for quick retrieval
- Smart Response Formatting: Handles long responses by breaking them into sections
- Python 3.8 or higher
- Discord Bot Token (from Discord Developer Portal)
- AnythingLLM API access
- Discord Server with a designated channel for the bot
- Clone the repository:
git clone https://github.com/warshanks/murray.git
cd murray
- Set up a virtual environment (recommended):
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory with the following configuration:
# Discord Configuration
DISCORD_TOKEN=your_discord_bot_token
TARGET_CHANNEL_ID=your_channel_id
# AnythingLLM Configuration
ANYTHINGLLM_API_KEY=your_api_key
ANYTHINGLLM_BASE_URL=your_base_url
ANYTHINGLLM_ENDPOINT=${ANYTHINGLLM_BASE_URL}/workspace/murray/chat
ANYTHINGLLM_WORKSPACE=murray
- Make sure your virtual environment is activated:
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
- Start the bot:
python main.py
-
The bot will automatically:
- Monitor the FIA website for new F1 documents
- Download and process new documents
- Update the AnythingLLM workspace with new information
-
Interact with the bot in your Discord channel:
- Simply ask questions about F1 regulations or recent decisions
- The bot will respond with relevant information from the FIA documents
main.py
: Core bot functionality and document monitoringscraper.py
: FIA website document scraping functionalityupload_documents.py
: Document processing and AnythingLLM integrationdocuments/
: Directory for storing downloaded FIA documentsrequirements.txt
: Python dependencies
Contributions are welcome! Please feel free to submit a Pull Request.