AI integration extension for LMS4WP plugin. Supports multiple AI providers including Groq, RunPod, and OpenRouter.
- 🤖 Multiple AI Provider Support (Groq, RunPod, OpenRouter)
- 🎨 Modern Admin Interface
- 🔒 Secure API Key Management via .env
- ⚡ Fast and Lightweight
- 🔌 Easy to Extend
- WordPress 6.0+
- PHP 8.0+
- LMS4WP plugin (main plugin) must be installed and activated
- Clone this repository to
wp-content/plugins/lms4wp-ai/ - Copy
.env.exampleto.env - Add your API keys to
.envfile - Run
composer installto install dependencies - Activate the plugin in WordPress admin
Edit .env file with your API keys:
# Groq (Default)
GROQ_API_KEY="your_groq_api_key_here"
GROQ_MODEL="llama-3.1-8b-instant"
# RunPod (Optional)
RUNPOD_API_KEY="your_runpod_api_key_here"
RUNPOD_ENDPOINT_ID="your_endpoint_id_here"
# OpenRouter (Optional)
OPENROUTER_API_KEY="your_openrouter_api_key_here"- Go to LMS4WP > AI Assistant in WordPress admin
- Select your preferred AI provider
- Type your message and click "Send to AI"
- View the AI response
- Fast inference with Llama models
- Free tier available
- Models: llama-3.1-8b-instant, llama-3.1-70b-versatile, etc.
- Self-hosted GPU inference
- Custom endpoints
- Models: Llama, Mistral, etc.
- Unified API for multiple models
- Access to OpenAI, Anthropic, and more
- Models: GPT-4, Claude, Llama, etc.
# Install dependencies
composer install
# Development structure
includes/
├── AI/
│ ├── ProviderInterface.php
│ ├── AbstractProvider.php
│ ├── ProviderManager.php
│ └── Providers/
│ ├── GroqProvider.php
│ ├── RunPodProvider.php
│ └── OpenRouterProvider.php
├── Admin/
│ ├── Menu.php
│ └── TestPage.php
└── Core/
├── EnvLoader.php
└── Extension.phpMIT License - see LICENSE file for details
4wp.dev - https://4wp.dev