A WordPress plugin that provides an AI-powered chatbot using RAG (Retrieval-Augmented Generation) architecture with LLPhant, Llama 3.2 (via Ollama), and Elasticsearch.
Swayam (स्वयं)—an ancient Sanskrit word meaning "self." Your content. Your knowledge. Autonomously intelligent.
- PHP: 8.2 or higher
- WordPress: 6.0 or higher
- Ollama: Running locally with Llama 3.2 model
- Elasticsearch: 9.x with vector search support
- Composer: For dependency management
1. Install the Plugin
# Navigate to your WordPress plugins directory
cd /path/to/wordpress/wp-content/plugins/
# Clone or copy the plugin
cp -r /path/to/swayam-ai-chatbot ./
# Install dependencies
cd swayam-ai-chatbot
composer install2. Install and Start Ollama
You can install Llama 3.2 using ollama.
For installing ollama on Linux, run the following command:
curl -fsSL https://ollama.com/install.sh | shFor macOS or Windows use the download page.
It is recommended to install Llama 3.2-1B or 3B for optimized CPU/GPU, and RAM usage.
For installing Llama3.2-3B use the following command:
ollama run llama3.2:3bYou can start interacting to the LLama3.2 model using a chat. To exit, write /bye in the chat.
3. Install and Start Elasticsearch
curl -fsSL https://elastic.co/start-local | shThis script will install Elasticsearch and Kibana using a docker-compose.yml file stored in
elastic-start-local folder.
Elasticsearch and Kibana will run locally at http://localhost:9200 and http://localhost:5601.
All the settings of Elasticsearch and Kibana are stored in the elastic-start-local/.env file.
You can use the start and stop commands available in the elastic-start-local folder.
To stop the Elasticsearch and Kibana Docker services, use the stop command:
cd elastic-start-local
./stop.shTo start the Elasticsearch and Kibana Docker services, use the start command:
cd elastic-start-local
./start.sh