Rapls AI Chatbot

Rapls AI Chatbot

توسط

Rapls AI Chatbot adds an AI chatbot to your site with OpenAI, Claude, Gemini, or OpenRouter. Includes site learning, knowledge base, web search, and automatic multilingual replies in 13 languages — visitors get answered in their browser language without you maintaining a separate translation.

This is especially useful for tourism, hospitality, and retail sites that get inquiries in languages they don’t have native staff for: a Japanese inn answering visitors in English / Chinese / Korean / Spanish / etc., a tour operator handling questions in the visitor’s own language, or a multilingual storefront whose actual support team is one person.

👉 Documentation & Developer’s Guide: Why I built this plugin and how RAG works

Key Features

  • Multiple AI Providers — OpenAI, Anthropic Claude, Google Gemini, and OpenRouter (100+ models via single API key)
  • Web Search — AI automatically searches the web when the knowledge base lacks a sufficient answer, using each provider’s built-in capability (OpenAI web_search_preview, Claude web_search, Gemini google_search)
  • Site Learning — Crawl and index your website content (posts, pages, custom post types, WooCommerce products) for context-aware responses
  • Vector Embedding RAG — Hybrid search combining keyword matching (40%) and vector similarity (60%) for accurate retrieval
  • Custom Knowledge Base — Add Q&A pairs, free-form content, PDF/DOCX uploads with priority levels and draft/published workflow
  • MCP Server — 7 built-in tools via JSON-RPC 2.0 for AI agent integration (Claude Desktop, Cursor, VS Code)
  • WordPress Abilities API — Auto-register MCP tools as WordPress Abilities for discovery by MCP Adapters
  • Gutenberg Block — Insert AI Chatbot block in the block editor with height, theme, and bot-id settings; SSR support
  • Response Language Auto-detect — Automatically detect browser language for welcome message and AI responses
  • Cross-site Embed — Embed the chatbot on external sites via iframe or script loader
  • Conversation History — Save and review all chat conversations with configurable retention
  • Usage Statistics — Track token usage and estimated API costs with visual charts and provider breakdown
  • Feedback & Regeneration — Users can rate responses (thumbs up/down) and request regeneration
  • 6 Built-in Themes — Default, Simple, Classic, Light, Minimal, Flat
  • Security — reCAPTCHA v3, rate limiting, consent mode, Cloudflare support, security diagnostics
  • Settings Import/Export — Backup and restore all settings as JSON
  • Automatic Multilingual Replies (13 languages) — Auto-detects the visitor’s browser language and replies in it. English, Japanese, Chinese, Korean, Spanish, French, German, Portuguese, Italian, Russian, Arabic, Thai, Vietnamese. Welcome messages are also configurable per language. Practical use case: a tourism / hospitality / retail site that doesn’t have multilingual staff can still answer foreign visitors in their own language

Supported AI Models

OpenAI:
* GPT-5.2, GPT-5.1, GPT-5 series (Latest generation)
* GPT-4.1 series (Long context, 1M tokens)
* GPT-4o, GPT-4o-mini (Multimodal)
* o1, o3, o4-mini (Reasoning models)

Anthropic Claude:
* Claude Opus 4.6 (Most powerful)
* Claude Sonnet 4.5 (Recommended — fast and powerful)
* Claude Haiku 4.5 (Recommended — fastest)
* Claude Opus 4.5, Opus 4.1, Sonnet 4, 3.7 Sonnet

Google Gemini:
* Gemini 3 Pro/Flash (Preview, latest)
* Gemini 2.5 Pro/Flash (Recommended)
* Gemini 2.0 Flash (Stable)
* Gemini 1.5 Pro/Flash (Legacy)

OpenRouter:
* Access 100+ models from multiple providers through a single API key

Dashboard

The dashboard provides an at-a-glance overview of your chatbot’s activity:

  • Statistics cards: total conversations, today’s messages, indexed pages, knowledge entries, monthly AI responses with usage limit
  • Status indicators: AI provider, site learning, conversation history
  • API usage statistics (past 30 days): total tokens, input/output tokens, estimated cost, daily usage chart, provider breakdown

Settings (5 Tabs)

AI Settings — Configure your AI provider, model, and API key. Enable vector search (RAG) with embedding provider. Set up MCP server with API key generation and Claude Desktop configuration example.

Chat Settings — Customize bot name, avatar (emoji or image), welcome messages (13 languages: English, Japanese, Chinese, Korean, Spanish, French, German, Portuguese, Italian, Russian, Arabic, Thai, Vietnamese), system prompt, response language, message history count, feedback buttons, and API quota error message. Advanced: context prompts for knowledge matching, Q&A format, and site learning; feature prompts for regeneration instructions, good/bad example learning, and conversation summary.

Display Settings — Choose from 6 free themes (Default, Simple, Classic, Light, Minimal, Flat). Configure badge position (4-corner grid), margins, primary/secondary colors, mobile display, Markdown rendering, typing indicator, maximum input length, page exclusion, footer text, and cross-site embed options (script or iframe).

Security Settings — Enable reCAPTCHA v3 with site key, secret key, and score threshold. Configure access control: consent strict mode, rate limiting, Cloudflare integration, reverse proxy trust, reCAPTCHA failure mode. View security diagnostics (read-only): allowed origins, trusted proxies, IP detection, API key status, WP Consent API, rate limiting, reCAPTCHA, SSL/TLS, CSRF.

Data Management — Enable/disable conversation history with configurable retention period. Import/export settings (optionally including knowledge base). Reset all settings to defaults.

Knowledge Base

  • Add entries as text: title, content, category, priority level
  • File import: .txt, .csv, .md, .pdf, .docx (server-side parsing)
  • Statistics: total entries, active, inactive, categories
  • Filter by status: all, published, draft
  • Sortable table: ID, title, category, type, priority, updated date
  • Unlimited entries

Site Learning

The plugin crawls and indexes your published content for context-aware AI responses:

  • Posts and Pages
  • Custom Post Types
  • WooCommerce Products
  • Any public content

With vector embedding enabled, hybrid search combines keyword matching (40%) and vector similarity (60%) for better retrieval accuracy.

Free vs Pro

The free version is fully functional with no artificial limits — you pay only your own AI API costs. An optional Pro add-on is available for business-oriented features.

  • Free — Full AI chat, unlimited responses, unlimited knowledge base, 6 themes, MCP server, Gutenberg block
  • Pro — Adds analytics, lead capture, scenarios, operator mode, WooCommerce, LINE, and more

What Free includes:

  • All 4 AI providers (OpenAI, Claude, Gemini, OpenRouter)
  • Unlimited AI responses and knowledge base entries
  • Web search, site learning with vector RAG
  • MCP server, Gutenberg block, cross-site embed
  • 6 themes, feedback, regeneration, reCAPTCHA, security diagnostics

What Pro adds:

  • Analytics dashboard with satisfaction scores, FAQ ranking, and PDF export
  • Lead capture forms, CSV/JSON export, webhooks, Google Sheets
  • Conversation scenarios, business hours, human handoff, operator mode
  • WooCommerce product cards, LINE Messaging API, Slack notifications
  • 10 additional themes, dark mode, voice input/TTS, multimodal
  • Response caching, encryption, audit logs, and more

Learn more about Pro features at raplsworks.com, or read the developer’s overview for the full context.

External Services

This plugin connects to the following external third-party services. No data is sent to any service until you configure an API key and enable the feature in the plugin settings. Each service requires the site administrator to create an account and obtain API credentials. By using these services, you agree to their respective terms and privacy policies listed below.

1. OpenAI (GPT models) — AI Provider

Used when you select OpenAI as your AI provider. User messages and optionally site content are sent to generate AI responses.

2. Anthropic (Claude models) — AI Provider

Used when you select Anthropic Claude as your AI provider. User messages and optionally site content are sent to generate AI responses.

3. Google (Gemini models) — AI Provider

Used when you select Google Gemini as your AI provider. User messages and optionally site content are sent to generate AI responses.

4. OpenRouter — AI Provider

Used when you select OpenRouter as your AI provider. OpenRouter is a unified API gateway that routes requests to various AI models.

5. Google reCAPTCHA v3 (Optional)

Used only if you enable reCAPTCHA in the plugin settings for spam protection. The visitor’s IP address and interaction data are sent to Google for verification.

6. LINE Messaging API (Pro Add-on, Optional)

Used only if you enable the LINE integration via the Pro add-on. Connects to the LINE Messaging API for chatbot-to-LINE messaging.

Cross-Site Embed

The plugin includes an optional embed loader script (embed-loader.js) for embedding the chatbot on external websites via an iframe. This script does not load any external CDN resources or third-party scripts — it creates an iframe pointing back to your own WordPress site. All data processing occurs on your server.

Data Transmitted to External Services

  • User messages: Chat messages entered by visitors (sent to the configured AI provider only)
  • Site content (if Site Learning is enabled): Excerpts from your published posts/pages (sent to the configured AI provider)
  • Knowledge base (if configured): Custom Q&A entries you create (sent to the configured AI provider)
  • IP address (reCAPTCHA only): Sent to Google for spam verification

Data Storage

  • Conversation history: Stored locally in your WordPress database (can be disabled)
  • Visitor IP: Stored as SHA-256 hash (not plain text) for rate limiting
  • Retention: Configurable auto-deletion period (default 90 days)

User Controls

You can disable these features in the plugin settings:
* Conversation history saving
* Site content crawling/learning
* Google reCAPTCHA verification
* Web search

Privacy

Data Collected

When conversation history is enabled, the plugin stores:
* Chat messages (user and AI responses)
* Session identifiers
* Page URLs where chats occurred
* Hashed IP addresses (SHA-256, not reversible)
* Timestamps

Data Retention

Conversation data is automatically deleted after the configured retention period (default: 90 days). Administrators can manually delete conversations at any time.

User Rights

Site administrators can:
* View all conversation history
* Delete individual or all conversations
* Export settings (does not include conversation data)
* Disable history saving entirely= Developer Information =

The plugin provides hooks and filters for customization:

Available Filters

  • raplsaich_system_prompt — Modify the system prompt sent to AI
  • raplsaich_context — Modify the context from site learning
  • raplsaich_ai_response — Filter the AI response before display
  • raplsaich_chatbot_enabled — Control chatbot visibility programmatically
  • raplsaich_allowed_origins — Add allowed origin hosts for same-origin check
  • raplsaich_chat_response_data — Filter chat response data before returning to client
  • raplsaich_gpt5_token_multiplier — GPT-5 reasoning token multiplier (default: 4, range: 1-8)

Example: Custom System Prompt

add_filter( 'raplsaich_system_prompt', function( $prompt, $settings ) {
    return $prompt . "nnAlways end responses with a friendly emoji.";
}, 10, 2 );

Example: Conditionally Hide Chatbot

add_filter( 'raplsaich_chatbot_enabled', function( $enabled ) {
    // Hide on checkout page
    if ( is_page( 'checkout' ) ) {
        return false;
    }
    return $enabled;
} );

REST API Endpoints

The plugin registers REST API endpoints under the rapls-ai-chatbot/v1 namespace:

Session authentication: Pass the session ID via the X-RAPLSAICH-Session HTTP header (recommended). When the header is present, any session_id in the request body is ignored (prevents APM/WAF body-logging leakage). Query string parameters (?session_id=...) are not accepted for GET requests to prevent session leakage in server access logs.

Free:

  • GET /rapls-ai-chatbot/v1/session — Get or create a chat session
  • POST /rapls-ai-chatbot/v1/chat — Send a message and receive AI response
  • GET /rapls-ai-chatbot/v1/history/{session_id} — Get conversation history
  • POST /rapls-ai-chatbot/v1/feedback — Rate a response (thumbs up/down)
  • POST /rapls-ai-chatbot/v1/regenerate — Regenerate AI response
  • GET /rapls-ai-chatbot/v1/message-limit — Check message limits
  • POST /rapls-ai-chatbot/v1/lead — Submit lead form
  • GET /rapls-ai-chatbot/v1/lead-config — Lead form configuration

The Pro add-on registers additional endpoints for analytics, scenarios, LINE, and more. See the Pro documentation for details.

Settings Architecture

Extension settings are stored under the extensions key in raplsaich_settings. For backward compatibility, the legacy pro_features key is read as a fallback but all new settings are written to extensions.

Database Tables

The plugin creates the following database tables:

  • {prefix}_aichat_conversations — Chat sessions
  • {prefix}_aichat_messages — Individual messages with token tracking
  • {prefix}_aichat_index — Site learning content index
  • {prefix}_aichat_knowledge — Custom knowledge base entries
  • {prefix}_aichat_leads — Lead capture data

Uninstallation

When uninstalled with “Delete data on uninstall” enabled, the plugin removes all database tables, options, and transients. Without this setting, data is preserved for re-installation.

Development

Release ZIPs are CI-verified for packaging correctness. Report any issues via the support forum.

Credits

  • Chart.js (MIT License) — Usage statistics charts
  1. Upload the rapls-ai-chatbot folder to the /wp-content/plugins/ directory
  2. Activate the plugin via the ‘Plugins’ menu in WordPress
  3. Go to AI Chatbot > Settings to configure your AI provider and API key
  4. Customize the chatbot appearance and behavior as needed
  5. The chatbot will automatically appear on your site

API Key Setup

You’ll need an API key from at least one AI provider:

MCP Server Setup

  1. Go to AI Chatbot > Settings > AI Settings
  2. Enable MCP and click “Generate API Key”
  3. Copy the endpoint URL and API key
  4. Add the configuration to your AI agent (Claude Desktop, Cursor, or VS Code)

The plugin provides 7 MCP tools: get_site_info, search_content, get_knowledge, manage_knowledge, get_conversations, get_settings, search_products (Pro).

سوالات متداول

Where can I find detailed documentation?

A comprehensive developer’s guide explains why this plugin was built, how the RAG hybrid search works, setup walkthroughs, and common troubleshooting:

Which AI provider should I choose?

Each provider has different strengths:
* OpenAI GPT-4o-mini — Best balance of cost and performance for most use cases
* Claude Sonnet 4.5 — Excellent for nuanced, helpful responses
* Gemini 2.5 Flash — Fast and cost-effective, good for high-volume sites
* OpenRouter — Access to 100+ models from multiple providers with a single API key

How much does it cost to use?

The plugin itself is free. You pay for AI API usage directly to your chosen provider. Typical costs:
* GPT-4o-mini: ~$0.15/1M input tokens, ~$0.60/1M output tokens
* Claude Haiku 4.5: ~$0.80/1M input tokens, ~$4.00/1M output tokens
* Gemini 2.5 Flash: ~$0.15/1M input tokens, ~$0.60/1M output tokens

Can I use multiple AI providers?

You can configure multiple API keys, but only one provider is active at a time. You can switch between providers in the settings.

How does Site Learning work?

The plugin crawls your published content and creates a searchable index. When users ask questions, relevant content is included in the AI context for accurate, site-specific responses. With vector embedding enabled, hybrid search combines keyword matching (40%) and vector similarity (60%) for better retrieval.

How does Web Search work?

When the knowledge base and site content don’t have a sufficient answer, the AI automatically searches the web using each provider’s built-in capability (OpenAI web_search_preview, Claude web_search, Gemini google_search). Web sources are shown with a globe icon.

What is the MCP Server?

MCP (Model Context Protocol) allows external AI agents like Claude Desktop, Cursor, and VS Code to interact with your chatbot’s data. The plugin provides 7 built-in tools for searching content, managing knowledge, and viewing conversations. Tools are also registered as WordPress Abilities for auto-discovery.

Can I embed the chatbot on external sites?

Yes. The plugin provides a cross-site embed page (?raplsaich_embed=1) and a loader script (assets/js/embed-loader.js) for easy integration on any external website via iframe.

Can I use the Gutenberg block?

Yes. Search for “AI Chatbot” in the block editor to insert the chatbot block. Configure height, theme, and bot-id settings. Server-side rendering (SSR) is supported.

Can I customize the chatbot appearance?

Yes. You can customize:
* Bot name and avatar (emoji or image)
* Primary and secondary colors
* Theme (6 built-in themes)
* Welcome message (13 languages)
* Badge position, margins, and icon
* Mobile visibility
* Excluded pages
* Typing indicator and Markdown rendering

Is conversation history saved?

Yes, by default. You can disable this in Settings > Data Management. Saved conversations are auto-deleted after the configured retention period (default: 90 days).

Does it work with page builders?

Yes, the chatbot widget works with any theme and page builder including Elementor, Divi, Beaver Builder, and Gutenberg.

Can I use custom system prompts?

Yes. Configure your own system prompt to define the AI’s personality, behavior, and response style. The raplsaich_system_prompt filter is also available for programmatic customization. Advanced feature prompts (regeneration, feedback learning, summary) are also customizable.

What happens if I exceed my API quota?

The plugin displays a customizable error message when your AI provider’s quota limits are reached. There is no artificial response limit in the plugin itself.

What is the Pro add-on?

The Pro add-on is a separate plugin that adds business-oriented features such as analytics, lead capture, conversation scenarios, operator mode, WooCommerce integration, and LINE integration. The free version is fully functional on its own with no artificial limits.

What happens to my data when I uninstall?

By default, the plugin keeps your settings and conversation data so you can re-install without losing anything. To delete all data on uninstall, enable “Delete data on uninstall” in Settings > Data Management. Temporary cache and diagnostic counters are always removed regardless of this setting. On multisite, each site has its own setting.

How can I adjust multisite uninstall performance?

On large multisite networks, uninstall batch size is adjustable via filters. Add to your functions.php or an MU-plugin:

add_filter( 'raplsaich_uninstall_batch_size', function() { return 50; } );

add_filter( 'raplsaich_uninstall_snapshot_threshold', function() { return 1000; } );

Guide: low-memory/slow-DB batch size 20-50, standard 100, fast/large-scale 200-500.

×
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
بازخورد (Feedback) های اینلاین
مشاهده همه دیدگاه ها
هیچ نسخه‌ای برای این آیتم موجود نیست.
★★★★★
★★★★★
5.0 /5 (2 نظر)

قیمت:

رایگان

نگارش

آخرین انتشار

16 اردیبهشت 1405

آخرین بروزرسانی

1 ماه پیش

نصب های فعال

-

نگارش وردپرس

وردپرس 6.3+

تست شده از نسخه

وردپرس 6.9.4

نگارش PHP

PHP 7.4+

نسخه ها

0 نسخه