offline_ai
WebLLM AI brings powerful artificial intelligence capabilities directly to your Drupal site without requiring external API keys or cloud services. This module integrates WebLLM technology to run large language models entirely in users' browsers using WebGPU, providing private, offline AI functionality for content generation, text processing, and interactive AI features while keeping all data completely local.
Features
Core Functionality:
- Browser-based AI: Runs language models directly in users' browsers using WebGPU acceleration
- No API Dependencies: Zero reliance on external AI services like OpenAI, Claude, or Google AI
- Complete Privacy: All AI processing happens locally - no data leaves the user's device
- Multiple Model Support: Compatible with various WebLLM-supported models (Llama, Phi, Gemma, etc.)
- RAG Integration: Includes Retrieval-Augmented Generation for context-aware responses
- Interactive Chat Interface: Ready-to-use chat functionality for websites
- Content Generation: AI-powered content creation tools for editors and content creators
Use Cases:
- Privacy-focused websites requiring AI without data sharing
- Offline-capable applications needing AI functionality
- Educational platforms with interactive AI tutoring
- Content management workflows with AI assistance
- Customer service chatbots without external dependencies
- Creative writing and content brainstorming tools
Post-Installation
After installation:
- Configuration: Navigate to
/admin/config/webllm-aito configure model settings and preferences - Model Selection: Choose from available WebLLM models based on your performance requirements
- Chat Block: Place the "WebLLM AI Chat" block on any page where you want AI interaction
- Content Integration: Use the AI-powered content generation tools in your text editors
- RAG Setup: Configure document upload and indexing for context-aware AI responses
- Permissions: Set appropriate user permissions for AI features under People → Permissions
Important: Users need modern browsers with WebGPU support. The first model load may take time as models are downloaded and cached locally.
Additional Requirements
Browser Requirements:
- Modern browsers with WebGPU support (Chrome 113+, Edge 113+, Firefox with flags enabled)
- Sufficient GPU memory for model inference
- HTTPS required for WebGPU functionality
Drupal Dependencies:
- Drupal 9.3+ or Drupal 10+
- No additional contrib modules required
System Requirements:
- Client-side GPU with WebGPU support
- Adequate browser memory allocation
- Stable internet connection for initial model downloads
Recommended modules/libraries
Enhanced Functionality:
- Paragraphs: For rich content creation with AI assistance
- CKEditor 5: Better integration with AI-powered text editing
- Views: Create custom displays of AI-generated content
- Token: Enhanced token replacement in AI-generated content
- Pathauto: Automatic URL generation for AI-created content
Development:
- Devel: Debugging AI model performance and responses
- Stage File Proxy: Managing large model files in development environments
Similar projects
Key Differentiators:
- OpenAI Integration: Requires API keys and sends data to external services; WebLLM AI is completely local
- ChatGPT modules: Depend on OpenAI's services; this module works offline
- AI Content modules: Most require cloud APIs; WebLLM AI preserves complete privacy
- Traditional chatbots: Rule-based systems; this provides true AI understanding and generation
WebLLM AI is unique in providing enterprise-grade AI functionality without any external dependencies or privacy concerns.
Supporting this Module
This module is developed and maintained as part of the open-source Drupal community. Support development by:
- Contributing code improvements and bug fixes
- Testing with different models and browser configurations
- Providing feedback and feature requests
- Helping with documentation and community support
Community Documentation
Resources:
- Demo Site - Try the module live
- Video Walkthrough - Complete setup and usage guide
- WebLLM Documentation - Understanding the underlying technology
- WebGPU Compatibility - Check browser support
- GitHub Repository - Source code and issue tracking
Getting Started:
The module includes a comprehensive setup wizard and demo content to help you get started quickly. Check the included README.md for detailed installation and configuration instructions.