Rapls AI Chatbot Free Manual

Rapls AI Chatbot Manual (Free Edition)

Complete documentation for every setting in the WordPress AI Chatbot plugin.
Version: 1.5.6 | PHP 7.4+ | WordPress 5.8+

Dashboard

The Dashboard is the landing page when you navigate to AI Chatbot in the WordPress admin menu. It provides an at-a-glance overview of your chatbot’s activity, configuration status, and API usage.

Overview

The Dashboard is divided into three main sections: Statistics Cards at the top, a Status panel in the middle, and API Usage Statistics at the bottom. All data updates automatically each time you load the page.

Statistics Cards

Five summary cards are displayed across the top of the Dashboard:

CardDescription
ConversationsTotal number of chat sessions recorded in the database. Each time a visitor opens the chat widget and sends a message, a new conversation is created.
Today’s MessagesNumber of individual messages (both user and AI) exchanged today. Resets at midnight based on the WordPress timezone setting.
Indexed PagesNumber of content chunks stored in the site learning index (wp_aichat_index table). Shows “0” if site learning is not configured. Requires the Pro edition for crawling functionality.
Knowledge EntriesTotal number of Q&A entries in your Knowledge Base.

Status Panel

The Status panel shows the current configuration state of key features:

Status ItemDescription
AI ProviderShows the currently selected AI provider and model (e.g., “OpenAI / gpt-4o-mini”). Displays a warning if no API key is configured.
Site LearningShows whether the content crawler is enabled and the last crawl date. In the Free edition, this always shows as requiring Pro.
History SavingShows whether conversation history saving is enabled or disabled, along with the retention period setting.

API Usage Statistics (Past 30 Days)

A detailed breakdown of your AI API token usage over the past 30 days:

MetricDescription
Total TokensCombined count of input and output tokens consumed across all conversations.
Input TokensTokens sent to the AI provider (system prompt + context + user message + conversation history).
Output TokensTokens generated by the AI provider in its responses.
Estimated CostApproximate USD cost based on each model’s published pricing. This is an estimate and may differ from your actual bill.
Usage ChartA daily bar chart showing token consumption trends over the past 30 days.
Provider BreakdownToken usage and estimated cost split by AI provider and model, showing which models consume the most resources.
Tip: Monitor the API Usage section regularly to understand your costs. If costs are higher than expected, consider switching to a more affordable model (e.g., gpt-4o-mini instead of gpt-4o) or reducing the Message History Count.

AI Settings

Configure your AI provider, API keys, models, vector embedding, and MCP server. Navigate to AI Chatbot > Settings > AI Settings tab.

AI Provider

Select the AI service your chatbot will use. Each provider requires its own API key and model selection.

Setting key: ai_provider

Default: openai

OptionValueDescription
OpenAI (ChatGPT) DefaultopenaiThe most widely used AI provider. Offers GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo, and the latest GPT-5 model.
Claude (Anthropic)claudeKnown for nuanced, safe responses. Claude Opus, Sonnet, and Haiku models available. Excels at following complex instructions.
Gemini (Google)geminiStrong multimodal capabilities. Gemini 2.0 Flash, 1.5 Pro, and more. Google offers a generous free tier.
OpenRouteropenrouterA unified gateway providing access to 100+ models from multiple providers through a single API key.
Tip: You can configure API keys for multiple providers simultaneously. Only the currently selected provider is used, but switching is instant since keys are saved independently.

OpenAI Settings

Configure your OpenAI API key and model. OpenAI is the default provider and offers the widest range of models.

How to get your OpenAI API key:

  1. Go to https://platform.openai.com/api-keys
  2. Sign in or create an OpenAI account
  3. Click Create new secret key
  4. Give it a name (e.g., “WordPress Chatbot”) and click Create secret key
  5. Copy the key immediately — it starts with sk- and is shown only once
  6. Add billing information under Settings > Billing to enable API access

API Key (openai_api_key) Required: Enter a key starting with sk-. The key is encrypted on save. Use the Test Connection button to verify connectivity. Use the Remove button to delete a saved key.

Model Selection (openai_model):

ModelFeaturesBest For
gpt-4o-mini DefaultFast, low-cost. Lightweight GPT-4o variantGeneral customer support, cost-effective deployments
gpt-4oHigh-performance multimodal. Vision-capableQuality responses with image understanding
gpt-4-turboFast GPT-4 with 128K context window. Vision-capableLong conversations, large knowledge bases
gpt-3.5-turboLowest cost optionBudget-conscious deployments
o1Reasoning model with chain-of-thoughtComplex problem solving, analytical tasks
o1-miniSmaller reasoning model, lower cost than o1Efficient reasoning tasks
o3-miniLatest efficient reasoning modelAdvanced reasoning at moderate cost
gpt-4.5-previewPreview model with enhanced creativityTesting latest capabilities
gpt-5Latest flagship model. Auto token multiplier appliedHighest quality responses
GPT-5 Token Multiplier: When using GPT-5 or reasoning models (o1, o3-mini), the configured max tokens is automatically multiplied (default: 4x) to account for internal reasoning tokens. A setting of 1000 becomes approximately 4000 effective tokens. Adjust via the wpaic_gpt5_token_multiplier filter (range: 1-8).
Tip: Click the refresh button (circular arrow icon) next to the model dropdown to fetch the latest available models from OpenAI when new models are released.

Claude (Anthropic) Settings

Configure your Anthropic API key and model. Claude excels at following complex instructions and providing nuanced, safe responses.

How to get your Anthropic API key:

  1. Go to https://console.anthropic.com/
  2. Sign in or create an Anthropic account
  3. Navigate to API Keys in the left sidebar
  4. Click Create Key
  5. Copy the key — it starts with sk-ant-
  6. Add billing information under Plans & Billing to enable API usage

API Key (claude_api_key) Required: Enter a key starting with sk-ant-. Encrypted at rest. Test Connection and Remove buttons are available.

Model Selection (claude_model):

ModelFeaturesBest For
claude-sonnet-4-20250514 DefaultLatest Sonnet. Excellent speed-quality balance. Vision-capableGeneral-purpose chatbot use
claude-opus-4-20250514Most capable Claude model. Vision-capable. Highest costComplex tasks, long-form content
claude-haiku-4-20250514Fastest and most affordable Claude modelSimple, fast responses
claude-3-5-sonnetPrevious-generation Sonnet. Vision-capableStrong all-around performance
claude-3-opusPrevious-generation flagship. Vision-capableComplex reasoning (previous gen)
claude-3-haikuPrevious-generation lightweightBudget deployments (previous gen)
Note: Claude and OpenRouter do not provide embedding APIs. If you want to use Vector Embedding (RAG), you must also configure an OpenAI or Gemini API key for the embedding provider.

Gemini (Google) Settings

Configure your Google AI API key and model. Gemini offers strong multimodal capabilities and a generous free tier.

How to get your Google AI API key:

  1. Go to https://aistudio.google.com/apikey
  2. Sign in with your Google account
  3. Click Create API key
  4. Select or create a Google Cloud project
  5. Copy the generated API key

API Key (gemini_api_key) Required: Enter your Google AI Studio API key. Encrypted at rest.

Model Selection (gemini_model):

ModelFeaturesBest For
gemini-2.0-flash-exp DefaultFast, capable, cost-effective. Vision-capableGeneral use, multimodal tasks
gemini-1.5-pro1M token context window. Excellent for long documentsLong document analysis, large knowledge bases
gemini-1.5-flashOptimized for speed and efficiency. Vision-capableFast, low-cost responses
gemini-2.0-flash-thinking-expEnhanced reasoning with visible thinking process. ExperimentalComplex reasoning tasks
Tip: Google offers a generous free tier for the Gemini API, making it an excellent choice for testing or low-traffic sites. Check the current free tier limits at Google AI Studio.

OpenRouter Settings

OpenRouter provides unified API access to 100+ models from multiple providers (OpenAI, Anthropic, Google, Meta, Mistral, and more) through a single API key.

How to get your OpenRouter API key:

  1. Go to https://openrouter.ai/keys
  2. Sign in or create an OpenRouter account
  3. Click Create Key
  4. Copy the key — it starts with sk-or-
  5. Add credits under Account > Credits to enable API usage

API Key (openrouter_api_key) Required: Enter a key starting with sk-or-. Encrypted at rest.

Model (openrouter_model): The default is openrouter/auto, which automatically selects the best model for each request. Click the refresh button to fetch the full list of available models.

Default: openrouter/auto

Tip: OpenRouter lets you try models from different providers without managing separate API keys. Use the refresh button to discover newly added models. Popular choices include anthropic/claude-3.5-sonnet, google/gemini-2.0-flash-exp, and meta-llama/llama-3.1-70b-instruct.

Vector Embedding (RAG)

Enables semantic search using AI embeddings for improved knowledge base and site content retrieval. Instead of relying solely on keyword matching, vector search understands the meaning of queries.

SettingKeyDescription
Vector Searchembedding_enabledEnabled: Uses AI embedding models to convert text into vectors. Queries are matched by semantic similarity. Greatly improves accuracy for Japanese and other non-English languages.
Disabled: Uses traditional FULLTEXT keyword matching only. Default: Disabled
Embedding Providerembedding_providerAuto Default – Automatically selects the best available provider based on configured API keys (prefers OpenAI)
OpenAI – Uses OpenAI’s text-embedding-ada-002 model. Requires OpenAI API key
Gemini – Uses Google’s embedding model. Requires Gemini API key
Status (read-only)When configured, shows the active provider/model and how many content chunks have been embedded vs. total. When misconfigured, shows an error message.

How to set up Vector Embedding:

  1. Ensure you have a valid API key configured for OpenAI or Gemini (even if your primary AI provider is Claude or OpenRouter)
  2. Go to Settings > AI Settings and scroll to the Vector Search section
  3. Toggle Vector Search to Enabled
  4. Select an Embedding Provider or leave on Auto
  5. Save settings
  6. If you have existing knowledge base entries or site learning content, run a crawl to generate embeddings
Important: Claude and OpenRouter do not offer embedding APIs. If your primary AI provider is Claude or OpenRouter, you must also configure an OpenAI or Gemini API key to use vector embedding.
Tip: Vector embedding significantly improves search quality for non-English languages (especially Japanese, Chinese, Korean) where keyword-based FULLTEXT search is less effective. It also helps when users ask questions using different wording than your knowledge base entries.

MCP (Model Context Protocol) Server

Enables external AI tools such as Claude Desktop, Cursor, Windsurf, and other MCP-compatible clients to access your site’s knowledge base and conversation data programmatically.

SettingKeyDescription
MCP Servermcp_enabledEnabled: Exposes a REST API endpoint for external AI agents to search your knowledge base and retrieve site info.
Disabled: MCP endpoint is not accessible. Default: Disabled
MCP API KeyClick Generate Key to create an authentication key. The key is displayed only once upon generation — store it securely. Click Regenerate Key to create a new key (the previous key is invalidated).
MCP EndpointAuto-generated REST API URL based on your site (e.g., https://example.com/wp-json/wp-ai-chatbot/v1/mcp). Click Copy for use in your MCP client configuration.

MCP Available Tools:

The MCP server exposes the following tools to connected AI clients:

  • search_knowledge — Search your knowledge base Q&A entries
  • get_site_info — Retrieve site information (name, URL, description, active theme, plugins)

Claude Desktop Configuration:

Add the following to your Claude Desktop configuration file (claude_desktop_config.json):

{
  "mcpServers": {
    "your-site-name": {
      "url": "https://example.com/wp-json/wp-ai-chatbot/v1/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_MCP_API_KEY"
      }
    }
  }
}

On macOS, the config file is located at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, it is at %APPDATA%\Claude\claude_desktop_config.json.

Cursor / Windsurf Configuration:

For Cursor, add the MCP server in Settings > MCP Servers. For Windsurf, configure it in the MCP settings panel. Both use the same URL and Authorization header format:

{
  "mcpServers": {
    "wordpress-chatbot": {
      "url": "https://example.com/wp-json/wp-ai-chatbot/v1/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_MCP_API_KEY"
      }
    }
  }
}
Tip: MCP enables powerful workflows. For example, use Claude Desktop to query your site’s knowledge base while writing content, or use Cursor to reference your chatbot’s FAQ data during development. Replace your-site-name with a descriptive identifier and YOUR_MCP_API_KEY with the key generated in the admin panel.
Security: The MCP API key grants read access to your knowledge base and site info. Treat it like a password. If compromised, regenerate it immediately from the admin panel.

Chat Settings

Configure how the chatbot behaves, what it says, and how it processes conversations. Navigate to AI Chatbot > Settings > Chat Settings tab.

Bot Name

The display name shown in the chat widget header and next to bot messages.

Setting key: bot_name

Default: Assistant

A Reset button is available to restore the default value.

Tip: Use your brand name or a friendly name like “Support Bot” or “Help Desk” to make the chatbot feel integrated with your site. Keep it short (under 20 characters) for optimal display in the chat header.

Bot Avatar

The avatar icon displayed next to bot messages in the chat widget.

Setting key: bot_avatar

Default: Robot emoji

  • Emoji: Enter any emoji character directly into the text field (e.g., a robot face, a speech bubble, your brand’s representative emoji).
  • Image: Click Select Image to open the WordPress Media Library and choose an image. Recommended size: 96×96 pixels or larger, square aspect ratio. Supported formats: JPG, PNG, GIF, SVG.

Use the Reset to Emoji button to revert to the default emoji avatar.

Tip: Using your company logo or a custom avatar image makes the chatbot feel more professional and on-brand. Keep the image file small (under 50KB) for fast loading.

Welcome Message

The first message displayed when a user opens the chat widget. This is a static greeting shown immediately — it is not sent to the AI.

Setting key: welcome_message

Default: Hello! How can I help you today?

Per-Language Welcome Messages (welcome_messages):

When the Response Language is set to Auto-detect, a collapsible panel appears below the welcome message field where you can configure separate welcome messages for 13 languages:

LanguageCodeExample
EnglishenHello! How can I help you today?
Japanesejaこんにちは!何かお手伝いできることはありますか?
Chinesezh你好!有什么可以帮助你的吗?
Koreanko안녕하세요! 무엇을 도와드릴까요?
Spanishes¡Hola! ¿En qué puedo ayudarte?
FrenchfrBonjour ! Comment puis-je vous aider ?
GermandeHallo! Wie kann ich Ihnen helfen?
PortugueseptOlá! Como posso ajudá-lo?
ItalianitCiao! Come posso aiutarti?
RussianruЗдравствуйте! Чем могу помочь?
Arabicarمرحباً! كيف يمكنني مساعدتك؟
Thaithสวัสดีครับ! มีอะไรให้ช่วยไหมครับ?
VietnameseviXin chào! Tôi có thể giúp gì cho bạn?

Priority order:

  1. Per-language message — If a specific message is configured for the detected browser language, it is used.
  2. Welcome Message — If no per-language message exists, the main welcome message is shown.
  3. Built-in default — If the welcome message is unchanged from the default, a built-in translation is used.
Tip: For multilingual sites, set Response Language to “Auto-detect” and configure per-language welcome messages to greet visitors in their own language. This significantly improves the first impression for international visitors.

Response Language

Controls which language the AI responds in.

Setting key: response_language

OptionValueDescription
Site Language Default(empty)Follows your WordPress site language setting (Settings > General)
Auto-detectautoDetects user input language and responds in the same language. Reveals per-language welcome message settings
EnglishenAlways respond in English
JapanesejaAlways respond in Japanese
ChinesezhAlways respond in Chinese
KoreankoAlways respond in Korean
SpanishesAlways respond in Spanish
FrenchfrAlways respond in French
GermandeAlways respond in German
PortugueseptAlways respond in Portuguese
ItalianitAlways respond in Italian
RussianruAlways respond in Russian
ArabicarAlways respond in Arabic
ThaithAlways respond in Thai
VietnameseviAlways respond in Vietnamese
Note: When “Auto-detect” is selected, the AI detects the language from the user’s first message and responds in that same language for the entire conversation. This is recommended for sites with international traffic.

System Prompt

The system prompt defines the AI’s behavior, personality, and constraints. It is sent as the first message in every conversation and acts as the AI’s instruction manual.

Setting key: system_prompt

Default: A comprehensive 6-rule prompt covering:

  1. ACCURACY: Use reference information as the primary source
  2. HONESTY: Clearly state when information is not available
  3. NO FABRICATION: Never invent facts, URLs, prices, or dates
  4. CONCISENESS: Provide clear, focused answers
  5. LANGUAGE: Respond in the same language as the user
  6. TONE: Be professional, friendly, and helpful

You can fully customize this prompt. Use the Reset to default button to restore the original.

System Prompt Examples:

E-commerce support bot:

You are the customer support assistant for [Store Name].
- Answer questions about products, shipping, returns, and orders
- Never recommend competitor products
- For order issues, always ask for the order number
- Shipping: Free over $50, standard 3-5 business days, express 1-2 days
- Returns: 30-day return policy, items must be unused
- If you cannot help, suggest contacting support@example.com

SaaS documentation bot:

You are the help assistant for [Product Name].
- Only answer questions about [Product Name] features and usage
- Reference the documentation when possible
- For billing questions, direct users to the billing page at /account/billing
- For bug reports, ask users to submit a ticket at /support
- Never share internal implementation details or roadmap

Restaurant information bot:

You are the virtual concierge for [Restaurant Name].
- Provide information about our menu, hours, and location
- Hours: Mon-Fri 11AM-10PM, Sat-Sun 10AM-11PM
- Location: 123 Main Street, City, State
- Reservations: Link to our booking page at /reservations
- Dietary accommodations: We offer vegan, gluten-free, and nut-free options
- For catering inquiries, suggest emailing catering@example.com
Tip: Include your company name, product details, and any hard rules (e.g., “Never recommend competitor products” or “Always include a link to our documentation page”). The more specific and detailed your system prompt, the better the AI will follow your guidelines.

Context Prompts (Advanced)

Customize how knowledge base and site learning data is presented to the AI. These prompts are appended to the system prompt when relevant data is found. This section is collapsed by default — check the checkbox to expand it.

Use {context} as a placeholder for the actual content in all context prompts.

PromptSetting KeyDescription
Knowledge Exact Matchknowledge_exact_promptUsed when an exact Q&A match is found in the knowledge base. Contains strict instructions to use only the matched answer without adding external information or combining sources. The AI is told to treat this answer as authoritative and not deviate from it.
Knowledge Q&Aknowledge_qa_promptUsed when Q&A-format entries are found (but not an exact match). Instructs the AI to look for the best matching Q&A pair and use the corresponding answer from the FAQ database. The AI may combine information from multiple entries if relevant.
Site Learning Contextsite_context_promptUsed when crawled site content is provided as context. Instructs the AI to treat this as reference information and match by meaning rather than exact keywords. The AI uses this content to ground its responses in your site’s actual information.

Each prompt has a Reset to default button to restore the original text.

Note: Most users should leave these prompts at their defaults. Only modify them if you need specific behavior when the AI uses knowledge base or site learning data. For example, you might want the AI to always cite the source page title when using site learning context.

Feature Prompts (Advanced)

Customize the behavior of regeneration, feedback learning, and summary features. This section is collapsed by default — check the checkbox to expand it.

PromptSetting KeyDescription
Regenerate Responseregenerate_promptInstruction appended when a user requests response regeneration. Directs the AI to generate a completely different answer with a different approach, style, or angle.
Feedback Good Headerfeedback_good_headerHeader text prepended to positively rated response examples sent to the AI as learning examples. Tells the AI “here are examples of responses users liked.”
Feedback Bad Headerfeedback_bad_headerHeader text prepended to negatively rated response examples, instructing the AI to avoid similar patterns. Tells the AI “here are examples of responses users disliked.”
Summary Promptsummary_promptPrompt used to generate conversation summaries (2-3 sentences highlighting main topics and conclusions). Used by the summary REST API endpoint.

Regenerate Prompt Placeholders:

PlaceholderDescription
{variation_number}A random number (1-1000) inserted each time to force the AI to generate a unique response.
{forbidden_start}The first 50 characters of the previous response. The AI is instructed not to begin with the same text.
{style}A randomly selected style instruction (e.g., “Use a casual tone”, “Explain from a different angle”) to vary the response style.

Each prompt has a Reset to default button to restore the original text.

Message History Count

Number of previous messages sent to the AI as context. More messages give the AI better conversational context but increase token usage and API costs.

Setting key: message_history_count

Default: 10 | Range: 1 – 50

A Reset button is available to restore the default value.

RangeUse CaseToken Impact
1 – 5Simple FAQ-style bots where each question is independentLow cost per message
5 – 10General customer support with some follow-up questionsModerate cost
15 – 20Complex multi-turn conversations (e.g., technical support, troubleshooting)Higher cost
30 – 50Extended advisory sessions requiring deep conversation contextSignificantly higher cost
Recommended: 5-10 for simple FAQ-style bots. 15-20 for complex multi-turn conversations. Values above 30 significantly increase token usage and may hit model context limits with long messages.

Max Tokens

Maximum number of tokens the AI can generate in a single response. One token is approximately 4 English characters or 1-2 characters in Japanese/Chinese/Korean.

Setting key: max_tokens

Default: 1000 | Range: 100 – 4000

A Reset button is available to restore the default value.

Token estimation guide:

TokensApproximate Length
250~190 English words (a short paragraph)
500~375 English words (a medium response)
1000~750 English words (a detailed response)
2000~1500 English words (a long, comprehensive response)
4000~3000 English words (a very long response)

GPT-5 and Reasoning Model Auto-Multiplier:

For GPT-5 and reasoning models (o1, o3-mini), the configured max tokens value is automatically multiplied to account for internal reasoning tokens. The default multiplier is x4, so a setting of 1000 becomes approximately 4000 effective tokens. Adjust the multiplier via the wpaic_gpt5_token_multiplier filter (range: 1-8). Higher multipliers improve response completeness but increase API costs.

Tip: 1000 tokens is usually sufficient for most customer support scenarios (roughly 750 words in English). Increase only if responses are being cut off mid-sentence. For Japanese/Chinese/Korean, each character uses more tokens, so consider increasing to 1500-2000 for these languages.

Temperature (Creativity)

Controls response randomness. Lower values produce consistent, deterministic answers; higher values produce creative, varied responses.

Setting key: temperature

Default: 0.7 | Range: 0 – 2 (step 0.1)

A Reset button is available to restore the default value.

RangeBehaviorBest For
0 – 0.3Highly consistent. Same question yields nearly the same answerFAQ bots, factual responses, technical support
0.4 – 0.7Balanced responses with some variationGeneral customer support
0.8 – 1.2Creative, diverse responsesCreative content, brainstorming
1.3 – 2.0Highly random, potentially incoherentUsually not recommended for production use
Tip: For customer support and FAQ bots, use 0.3-0.5 for maximum consistency. The default of 0.7 provides a good balance between consistency and natural-sounding variation.

Feedback Buttons

Displays thumbs-up and thumbs-down buttons below each AI response for users to rate quality.

Setting key: show_feedback_buttons

Enabled: Feedback buttons appear on every bot message. Positive and negative feedback are stored in the database and used in future prompts (see Feature Prompts) to improve response quality over time.

Disabled: No feedback buttons are shown. Users cannot rate responses.

Default: Disabled

Tip: Enable this to collect quality data and continuously improve your chatbot. The feedback is used as learning examples in subsequent conversations — the AI learns to produce responses similar to positively-rated ones and avoid patterns from negatively-rated ones. With the Pro edition, you can view feedback analytics and satisfaction scores in the Analytics dashboard.

API Quota Error Message

The message displayed to users when the AI provider’s API quota is exceeded or a billing issue occurs (e.g., you have run out of API credits).

Setting key: quota_error_message

Default: Currently recharging. Please try again later.

A Reset button is available to restore the default text.

Tip: Customize this message to include a link to your contact page or an alternative way to get help. For example: “Our AI assistant is temporarily unavailable. Please contact us at support@example.com or call 1-800-XXX-XXXX for immediate assistance.”

When the knowledge base does not contain a sufficient answer, the AI can automatically search the web in real time to provide up-to-date information.

Setting key: web_search_enabled

Enabled: The AI performs web searches when needed, providing up-to-date information from the internet. This is useful for questions about current events, live pricing, or information not in your knowledge base.

Disabled: The AI relies solely on its training data and your knowledge base/site learning content.

Default: Disabled

Important: Additional charges may apply depending on your AI provider. Some providers charge separately for web search / tool use capabilities. Check your provider’s pricing before enabling. Not all providers support web search — currently, OpenAI models support this feature most reliably.
Tip: Web search is most useful for general-purpose chatbots. For customer support bots focused on your specific products/services, it is usually better to rely on your knowledge base and site learning content to avoid potentially inaccurate external information.

Display Settings

Control the visual appearance and placement of the chat widget. Navigate to AI Chatbot > Settings > Display Settings tab.

Widget Theme

Select the visual theme for the chat widget. Each theme sets a coordinated color scheme and visual style for the header, messages, input area, and badge button.

Setting key: widget_theme

Default: default

Free Themes (6):

ThemeValueDescription
Default DefaultdefaultBlue-accented modern design with rounded cards and clean lines. Primary color: #007bff
SimplesimpleMinimalist design with subtle borders and neutral tones
ClassicclassicTraditional chat interface with a familiar, approachable feel
LightlightBright, airy design with soft shadows and a light color palette
MinimalminimalUltra-clean design with maximum whitespace and minimal decoration
FlatflatFlat design with no shadows or gradients. Bold, solid colors

Pro Themes (10): PRO

The Pro edition adds 10 additional themes: Modern, Gradient, Dark, Glass, Rounded, Ocean, Sunset, Forest, Neon, and Elegant. These are shown in the settings UI with a lock icon and cannot be selected without the Pro plugin. Each Pro theme is designed for specific aesthetics and branding needs.

Tip: Selecting a theme automatically updates the Primary Color to match the theme’s palette. You can then manually adjust the color if needed to match your brand.

Primary Color

The main accent color used for the chat header, send button, badge button, and user message bubbles. A color picker widget is provided.

Setting key: primary_color

Default: #007bff (blue)

A Reset button restores the default color. Note that selecting a theme automatically sets a matching color, but you can override it afterwards.

Tip: Use your brand’s primary color for a consistent look. Test the color with both light and dark text to ensure readability in the chat header and message bubbles.

Secondary Color

An additional accent color used for secondary UI elements. The exact usage depends on the selected theme.

Setting key: secondary_color

Default: Varies by theme

A color picker widget is provided. A Reset button restores the theme default.

Dark Mode PRO

Enables a dark color scheme overlay on the chat widget, regardless of the selected theme.

Setting key: dark_mode

Enabled: The chat widget uses dark backgrounds with light text. Works with any theme as an overlay.

Disabled: The widget uses standard light-mode colors from the selected theme.

Default: Disabled

This feature requires the Pro plugin. The setting is visible but disabled (locked) in the Free edition.

Badge Position

Controls where the floating chat badge button is positioned on the page. A visual grid selector lets you pick one of four corners.

Setting key: badge_position

OptionValueDescription
Bottom-Right Defaultbottom-rightMost common placement. Standard for chat widgets
Bottom-Leftbottom-leftUse when other elements occupy the bottom-right corner
Top-Righttop-rightFor layouts where top placement is preferred
Top-Lefttop-leftFor specialized layouts

Badge Margins (badge_margin_right, badge_margin_bottom):

Fine-tune the distance from the viewport edge. Margin labels dynamically change based on the selected position (e.g., “Right” and “Bottom” for bottom-right, “Left” and “Top” for top-left).

SettingRangeDefault
Horizontal margin0-200 px20 px
Vertical margin0-200 px20 px

A Reset button restores both margins to 20px.

Tip: Adjust margins to avoid overlapping with other floating elements like cookie banners, live chat widgets from other services, or “back to top” buttons. Test on both desktop and mobile to verify the position works well.

Badge Icon PRO

Customize the icon displayed inside the floating chat badge button.

The Free edition shows a default chat bubble SVG icon. A preview is displayed in the settings. The Pro edition allows four icon types:

  • Default: Built-in chat bubble icon (SVG)
  • Preset: Choose from a library of preset SVG icons
  • Image: Upload a custom image from the Media Library
  • Emoji: Use any emoji character

Badge icon customization is configured in Pro Settings > CUSTOMER > Badge Icon when the Pro plugin is active.

Markdown Rendering

Controls whether AI responses are rendered with Markdown formatting. The plugin includes a built-in Markdown parser (no external libraries required).

Setting key: markdown_enabled

Enabled: Bold, italic, code blocks, inline code, ordered/unordered lists, headings, and links are rendered as formatted HTML in bot messages.

Disabled: Bot messages display as plain text. Markdown syntax characters appear literally.

Default: Enabled

Supported Markdown syntax:

SyntaxResult
**bold**bold
*italic*italic
inline codeinline code
code blockFormatted code block with syntax highlighting
- item or * itemUnordered list
1. itemOrdered list
[text](url)Clickable link
# HeadingHeading (h1-h6)
Tip: Keep Markdown enabled. AI models naturally use Markdown formatting (especially for code snippets, lists, and emphasis), and rendering it makes responses much more readable.

Typing Indicator

Shows an animated typing indicator (three bouncing dots) while the AI is generating a response, giving users visual feedback that their message is being processed.

Setting key: typing_indicator

Enabled: Typing animation appears while waiting for the AI response.

Disabled: No visual feedback during AI processing (the response simply appears when ready).

Default: Enabled

Max Input Length

Maximum number of characters a user can type in a single message. This helps prevent excessively long messages that consume large amounts of tokens.

Setting key: max_input_length

Default: 1000 characters | Range: 100 – 10000

A character counter is displayed to the user as they type, showing remaining characters.

Tip: 1000 characters is sufficient for most support queries. Increase to 2000-5000 if users need to paste longer text (e.g., error logs, code snippets).

Mobile Display

Controls whether the chat widget appears on mobile devices (screen width below 768px).

Setting key: show_on_mobile

Enabled: The chat widget is displayed on mobile devices. On small screens, the chat window expands to fill the viewport for a better user experience.

Disabled: The chat widget (both badge and window) is completely hidden on mobile devices.

Default: Enabled

Note: Disabling mobile display can be useful if your mobile site already has other support channels (e.g., a phone call button) or if mobile performance is a concern.

Page Visibility

Fine-grained control over which types of pages display the chatbot.

SettingKeyDefaultDescription
Homepage / Front Pagebadge_show_on_homeEnabledYour site’s front page (static page or latest posts)
Single Postsbadge_show_on_postsEnabledIndividual blog posts
Pagesbadge_show_on_pagesEnabledWordPress pages (About, Contact, etc.)
Archivesbadge_show_on_archivesEnabledCategory, tag, date, and author archive pages

Include Only IDs (badge_include_ids):

Comma-separated post/page IDs. When set, the chatbot is displayed only on these specific pages, overriding the page type checkboxes above. Leave empty to use page type settings.

Example: 10, 25, 142

Exclude IDs (badge_exclude_ids):

Comma-separated post/page IDs where the chatbot should not appear, even if the page type is enabled.

Example: 5, 30, 200

How to find a page or post ID:

  1. Go to Pages (or Posts) in the WordPress admin
  2. Hover over the page/post you want
  3. Look at the URL in your browser’s status bar — the ID is the number after post=
  4. Alternatively, click Edit and check the URL, which shows post.php?post=XX
Tip: Use “Include Only” to restrict the chatbot to specific pages (e.g., product or pricing pages). Use “Exclude” to hide it from pages like login, checkout, or admin-facing pages.

Page Exclusion (Dropdown)

A user-friendly alternative to ID-based exclusion. Select specific published pages from a dropdown menu to hide the chatbot on those pages, without needing to look up page IDs.

Setting key: excluded_pages

Selected pages appear as tag-like chips with a remove button. Click Add after selecting a page from the dropdown. For posts, use the Exclude IDs field above.

Controls the “Powered by” footer text displayed at the bottom of the chat widget.

In the Free edition, no footer is shown by default.

The Pro edition allows you to add a custom footer or replace it with your own branding text via Pro Settings > CUSTOMER > Footer & CSS.

Cross-Site Embed

Display your chatbot on external websites that are not running this plugin. Two embed methods are provided with ready-to-use code snippets.

Script Embed (Recommended):

Paste the generated <script> tag before the closing </body> tag on the external site. This creates a floating chat badge identical to the one on your WordPress site.

<script src="https://example.com/wp-content/plugins/rapls-ai-chatbot/assets/js/embed.js"
  data-site="https://example.com"
  data-color="#007bff"
  data-position="bottom-right"
  async></script>

The script loads asynchronously and does not block page rendering. The embed code includes your site URL, primary color, and badge position as data attributes.

Iframe Embed:

Embeds the chat widget directly in the page at a fixed size. The chat window is always visible without requiring users to click a badge. Useful for dedicated support pages.

<iframe src="https://example.com/?wpaic_embed=1"
  width="400" height="600"
  style="border: none; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);">
</iframe>

Both code snippets include a Copy button for easy copying.

Important: For cross-site embedding to work, you must add the external site’s hostname to the allowed origins. Add the following code to your theme’s functions.php or a custom plugin:
add_filter('wpaic_allowed_origins', function($origins) {
    $origins[] = 'external-site.com';
    $origins[] = 'another-site.com';
    return $origins;
});
Tip: The script embed method is preferred because it matches the same floating badge experience as your WordPress site. The iframe method is useful when you want the chat to be always visible and embedded within the page layout (e.g., a dedicated “Chat with us” page).

Security Settings

Configure reCAPTCHA, access control, rate limiting, proxy settings, and view security diagnostics. Navigate to AI Chatbot > Settings > Security Settings tab.

Enable reCAPTCHA v3

Enables invisible Google reCAPTCHA v3 bot protection. reCAPTCHA v3 runs in the background without user interaction and assigns each request a score from 0.0 (likely bot) to 1.0 (likely human).

Setting key: recaptcha_enabled

Enabled: Each chat message is verified with reCAPTCHA before being sent to the AI. Requests scoring below the threshold are blocked.

Disabled: No reCAPTCHA verification. The chatbot relies on other security measures (rate limiting, bot detection).

Default: Disabled

How to set up Google reCAPTCHA v3:

  1. Go to https://www.google.com/recaptcha/admin
  2. Sign in with your Google account
  3. Click the + (Create) button
  4. Enter a label (e.g., “My WordPress Site”)
  5. Select Score based (v3) as the reCAPTCHA type
  6. Add your domain(s) under “Domains” (e.g., example.com)
  7. Accept the terms and click Submit
  8. Copy the Site Key and Secret Key displayed on the next page
  9. Paste both keys into the plugin settings

Site Key / Secret Key

Site Key (recaptcha_site_key):

The public key embedded in the frontend JavaScript. Not a secret; visible in page source. Enter as plain text.

Secret Key (recaptcha_secret_key):

The private key used for server-side verification. Stored encrypted in the WordPress database. After saving, the field shows masked dots. Leave the field empty when saving to keep the current key.

Important: Use reCAPTCHA v3 keys only. reCAPTCHA v2 keys (checkbox or invisible badge) will not work with this plugin. If you use v2 keys, verification will silently fail.

Score Threshold

The minimum reCAPTCHA score required to allow a chat message through.

Setting key: recaptcha_threshold

Default: 0.5 | Range: 0.0 – 1.0 (step 0.1)

RangeBehaviorRecommendation
0.1 – 0.3Very permissive. Only the most obvious bots are blockedUse if legitimate users are being blocked
0.4 – 0.5Balanced. Blocks most automated traffic while allowing legitimate usersRecommended for most sites
0.6 – 0.7Moderately strict. May occasionally affect users with VPNs or privacy browsersUse for sites targeted by bots
0.8 – 1.0Very strict. Will likely block some legitimate usersNot recommended for production use

Use Existing reCAPTCHA

If another plugin on your site already loads the reCAPTCHA v3 script (e.g., Contact Form 7, WPForms, Gravity Forms), enable this to avoid loading the script twice.

Setting key: recaptcha_use_existing

Enabled: The plugin does not load its own reCAPTCHA script. It reuses the reCAPTCHA instance already available on the page.

Disabled: The plugin loads its own reCAPTCHA v3 script using your Site Key.

Default: Disabled

Note: Only enable this if another plugin loads reCAPTCHA v3 on the same pages where the chatbot appears. If the script is absent, verification will fail and the Fail Mode setting determines behavior. Loading the reCAPTCHA script twice can cause conflicts and errors.

Integrates with the WP Consent API for GDPR-compliant behavior regarding localStorage and conversion tracking.

Setting key: consent_strict_mode

Enabled: User ID persistence (localStorage) and conversion tracking are disabled unless a WP Consent API-compatible consent management plugin is active and the user has granted consent. The chatbot itself still works normally — only storage and tracking features are affected.

Disabled: localStorage and conversion tracking work normally regardless of consent status.

Default: Disabled

What is affected by strict mode:
  • localStorage-based user ID persistence (session continuity across page loads)
  • Chat window size memory
  • Conversion tracking (Pro)
What is NOT affected: The chatbot functionality itself, AI responses, knowledge base, and all core features continue to work without consent.
Note: When strict mode is ON and no Consent API plugin is installed, the affected features will be disabled for all users. Install a compatible consent plugin (e.g., Complianz, CookieYes, GDPR Cookie Compliance) to manage user consent properly.

Rate Limiting

Limits the number of chat messages a single IP address can send within a time window, protecting your API budget from abuse.

Setting keys: rate_limit, rate_limit_window

Max Requests (rate_limit): Maximum messages allowed per IP within the time window. Set to 0 for unlimited.

Default: 20 requests

Time Window (rate_limit_window):

Value (seconds)Duration
601 minute
3005 minutes
60010 minutes
180030 minutes
36001 hour Default
108003 hours
216006 hours
4320012 hours
864001 day
Tip: 20 requests per hour is appropriate for most sites. For high-traffic support sites, increase to 50-100. For low-traffic sites or testing, you can set a lower limit. The Pro edition offers two-tier rate limiting (burst + sustained) for more granular control.

Proxy Settings

Configure how the plugin detects the real visitor IP address when your site is behind a CDN or reverse proxy. Correct IP detection is essential for rate limiting and bot detection.

Trust Cloudflare CF-Connecting-IP (trust_cloudflare_ip):

Enabled: Uses Cloudflare’s CF-Connecting-IP header to detect the real visitor IP. Enable only if your site is behind Cloudflare.

Disabled: Ignores the CF-Connecting-IP header.

Default: Disabled

Trust X-Forwarded-For (trust_proxy_ip):

Enabled: Uses the first public IP from the X-Forwarded-For header. Enable if your site is behind a reverse proxy (Nginx, AWS ALB, etc.).

Disabled: Ignores the X-Forwarded-For header. Uses REMOTE_ADDR directly.

Default: Disabled

Security Warning: Only enable these options if ALL traffic to your server passes through the respective proxy. If your server is directly accessible (bypassing the proxy), attackers can forge these headers to bypass rate limiting and IP-based security.

Setup examples:

Cloudflare setup:

  1. Verify your site is proxied through Cloudflare (orange cloud icon in DNS settings)
  2. Enable “Trust Cloudflare CF-Connecting-IP” in plugin settings
  3. Save and verify in Security Diagnostics that client IPs are detected correctly

Nginx reverse proxy setup:

  1. Ensure your Nginx configuration passes the real IP via X-Forwarded-For:
location / {
    proxy_pass http://backend;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Real-IP $remote_addr;
}
  1. Enable “Trust X-Forwarded-For” in plugin settings
  2. Add your proxy IP to the trusted proxies list via the filter:
add_filter('wpaic_trusted_proxies', function($proxies) {
    $proxies[] = '10.0.0.1';        // Single IP
    $proxies[] = '172.16.0.0/12';   // CIDR range
    return $proxies;
});

reCAPTCHA Fail Mode

Behavior when reCAPTCHA verification itself fails (e.g., Google’s servers are unreachable, network error).

Setting key: recaptcha_fail_mode

OptionValueDescription
Fail-open (Allow) DefaultallowAllows requests through when verification cannot be completed. The chatbot continues working. Recommended for most sites to avoid blocking users during outages
Fail-closed (Block)blockBlocks all requests when verification cannot be completed. Maximum security, but the chatbot becomes unusable if Google’s servers are down
Tip: “Fail-open” is recommended for most sites. Google’s reCAPTCHA service is highly reliable, but transient network issues can occur. “Fail-closed” is appropriate only for high-security environments where bot prevention is more important than availability.

Security Diagnostics

A read-only section at the bottom of the Security Settings tab showing the current security configuration status. All fields are informational and cannot be edited.

Diagnostic ItemDescription
Allowed Origin HostsList of hostnames accepted for Origin/Referer security checks. Your site’s hostname is always included. Additional hosts can be added via the wpaic_allowed_origins filter for cross-site embedding.
Trusted Proxy IPsList of proxy IPs/CIDRs trusted for X-Forwarded-For parsing. Empty by default. Add via the wpaic_trusted_proxies filter.
IP DetectionShows the detected client IP address and the method used (REMOTE_ADDR, CF-Connecting-IP, or X-Forwarded-For). Useful for verifying proxy settings are correctly configured.
API Key StatusShows which AI provider API keys are configured (without revealing the actual keys).
WP Consent APIShows whether the WP Consent API is available and whether strict mode is active.
Rate LimitingShows current rate limit configuration (requests per window).
reCAPTCHAShows whether reCAPTCHA is enabled and configured correctly.
SSL/TLSShows whether the site is served over HTTPS. HTTPS is strongly recommended for API key security and reCAPTCHA functionality.
CSRF ProtectionShows the WordPress nonce verification status for REST API endpoints.

Recent Bot Detections (past hour):

Displays requests blocked by the built-in bot detection system. Detection methods include:

  • Honeypot: Hidden form fields that bots fill in but real users never see
  • Timing: Requests submitted too quickly (faster than human typing speed)
  • Future clock: Requests with timestamps in the future (clock manipulation)

Counts marked “(approx)” are sampled 1-in-10 and displayed as estimated totals (x10). Detections are categorized by form type: Offline message, Chat, and Lead capture.

XFF Truncated (past hour): Number of oversized X-Forwarded-For headers truncated. High numbers may indicate a CDN/proxy chain issue or an attack.

Data Management

Configure conversation history storage, data retention, and settings import/export. Navigate to AI Chatbot > Settings > Data Management tab.

Save Conversation History

Controls whether chat conversations are stored in the WordPress database.

Setting key: save_history

Enabled: All conversations and messages are saved to the database. Enables conversation history viewing, analytics, feedback features, and session persistence across page loads.

Disabled: Conversations are processed in memory only and not persisted. Users cannot resume previous conversations, and no analytics data is collected.

Default: Enabled

Tip: Keep this enabled unless you have specific privacy requirements. Saved history is essential for feedback learning, analytics, and conversation review. If disabled, the feedback buttons feature will not function as there is no history to reference.

Retention Period

The number of days to keep conversation history before automatic deletion. A WordPress cron job (wpaic_cleanup_old_conversations) periodically cleans up conversations older than this threshold.

Setting key: retention_days

Default: 90 days | Set to 0 for unlimited retention (conversations are never automatically deleted)

Tip: For GDPR compliance, set a retention period appropriate for your privacy policy (e.g., 30 or 90 days). Shorter periods also keep your database smaller and improve query performance on high-traffic sites.

Delete Data on Uninstall

Controls whether plugin data is permanently removed when the plugin is uninstalled (deleted) from WordPress.

Setting key: delete_data_on_uninstall

Enabled: All plugin data is permanently deleted on uninstall, including:

  • All database tables (conversations, messages, knowledge base, index, leads)
  • All plugin settings and options (wpaic_settings, wpaic_version, etc.)
  • Diagnostic data and transients
  • Scheduled cron jobs

Disabled: Plugin settings are removed, but database tables (conversations, knowledge base, leads) are preserved for potential reinstallation.

Default: Disabled

Warning: When enabled, uninstalling the plugin permanently deletes all data. There is no undo. Export any important data (knowledge base, conversation history, settings) before uninstalling. Deactivating the plugin does NOT delete data — only uninstalling (deleting) does.

Settings Export

Export your plugin settings as a JSON file for backup or migration to another site.

How to export:

  1. Navigate to Settings > Data Management
  2. Optionally check Include Knowledge Base to export knowledge base entries along with settings
  3. Click Export Settings
  4. A JSON file will be downloaded to your computer (filename: wpaic-settings-YYYY-MM-DD.json)

What is exported:

  • All plugin settings (AI provider, model, chat settings, display settings, security settings)
  • Knowledge base entries (if the checkbox is checked)
  • Pro feature settings (if Pro is active)

What is NOT exported:

  • API keys (for security — you must re-enter them on the target site)
  • Conversation history
  • Lead data
  • Site learning index
Tip: Export settings before making major changes so you can easily revert. Also useful for deploying the same chatbot configuration across multiple WordPress sites.

Settings Import

Import settings from a previously exported JSON file.

How to import:

  1. Navigate to Settings > Data Management
  2. Click Choose File and select the exported JSON file
  3. Click Import Settings
  4. A confirmation message appears listing the settings that will be imported
  5. Confirm to apply the imported settings
Warning: Importing settings will overwrite your current settings. Export your current settings first as a backup before importing. API keys are not included in export files, so your existing API keys will remain unchanged.

Settings Reset

Reset all plugin settings to their factory defaults. This does not delete conversation history, knowledge base entries, or other stored data — only the settings are reset.

How to reset:

  1. Navigate to Settings > Data Management
  2. Click Reset All Settings
  3. A confirmation dialog appears asking you to confirm the action
  4. Confirm to reset all settings to defaults
Warning: This action cannot be undone. Export your settings first if you may need to restore them. API keys will also be cleared — you will need to re-enter them after resetting.

Knowledge Base

The Knowledge Base allows you to provide specific Q&A pairs that the chatbot prioritizes over its general AI knowledge. Navigate to AI Chatbot > Knowledge.

Overview

The Knowledge Base is a collection of question-answer pairs you create manually. When a user asks a question that matches (or closely matches) a knowledge base entry, the AI is instructed to use that specific answer rather than generating one from its general training data.

This is the most effective way to ensure accurate, consistent answers for frequently asked questions about your products, services, policies, or any topic specific to your business.

How matching works:

  1. Exact Match: If the user’s question exactly matches a knowledge base question, the corresponding answer is used with strict instructions (see Knowledge Exact Match context prompt). The AI will not add external information.
  2. Similar Match: If similar questions are found (via keyword or vector search), they are provided as a FAQ database for the AI to reference (see Knowledge Q&A context prompt). The AI may combine information from multiple entries.
  3. No Match: If no relevant entries are found, the AI responds using its general knowledge and any site learning context available.

Adding Q&A Entries

Add question-answer pairs using the form at the top of the Knowledge page.

How to add an entry:

  1. Navigate to AI Chatbot > Knowledge
  2. Fill in the Title (question) field
  3. Fill in the Content (answer) field
  4. Optionally set a Category and Priority
  5. Click Add Knowledge

Entries can be edited and deleted directly from the list. Changes take effect immediately for new conversations.

Entry Fields

FieldDescriptionRequired
Title (Question)The question or topic that triggers this entry. Write it as your users would ask it. You can have multiple entries with similar questions for better matching coverage.Yes
Content (Answer)The response the AI should use. Can include Markdown formatting, links, and structured information. Keep answers focused and accurate.Yes
CategoryOptional label for organization and filtering. Examples: “Pricing”, “Shipping”, “Technical”, “Returns”. Use consistent category names across entries.No
PriorityDetermines the order when multiple entries match. Higher priority entries are preferred. Range: 1-10.No
Type PROEntry type classification (e.g., FAQ, Policy, Tutorial). Available only in the Pro edition. Shown as locked in Free.No
Tip: Write questions in the same style your users would ask them. For example, instead of “Product pricing information,” write “How much does your product cost?” or “What are your prices?” Register multiple phrasings of the same question to improve recognition accuracy. For example, create separate entries for “What are your hours?”, “When are you open?”, and “What time do you close?” all with the same answer.

File Import

Bulk import knowledge base entries from files. Supported file formats:

FormatExtensionDescription
CSV.csvComma-separated values with question, answer, and optional category columns
Text.txtPlain text file with Q&A pairs separated by blank lines
Markdown.mdMarkdown-formatted content parsed into Q&A entries
PDF.pdfPDF documents with extractable text content
Word.docxMicrosoft Word documents

How to import:

  1. Navigate to AI Chatbot > Knowledge
  2. In the File Import section, click Choose File
  3. Select your file
  4. Optionally select a Category to assign to all imported entries
  5. Click Import

CSV Import Format

The CSV file should have columns for question, answer, and optionally category. The first row should be column headers.

Basic format (2 columns):

question,answer
"What are your prices?","Plans start at $10/month. See our pricing page for details."
"What are your business hours?","Monday to Friday, 9 AM to 6 PM EST."

Full format (3 columns):

question,answer,category
"What are your prices?","Plans start at $10/month.","Pricing"
"Do you offer a free trial?","Yes, we offer a 14-day free trial.","Pricing"
"How do I reset my password?","Go to the login page and click Forgot Password.","Account"
"What is your refund policy?","Full refund within 30 days of purchase.","Billing"
"Do you ship internationally?","Yes, we ship to over 50 countries.","Shipping"
CSV Tips:
  • Use UTF-8 encoding for non-English characters
  • Wrap fields containing commas in double quotes
  • Escape double quotes within fields by doubling them ("")
  • The column header names are flexible (question/title/q and answer/content/a are all accepted)

Statistics Cards

Four summary cards at the top of the Knowledge page show:

CardDescription
TotalTotal number of knowledge base entries
ActiveNumber of published (active) entries available to the chatbot
InactiveNumber of draft or disabled entries not used by the chatbot
CategoriesNumber of unique categories assigned across all entries

Entry List

Below the statistics cards and add/import forms, the Knowledge page displays a table of all entries with the following features:

  • Status Filter: Filter by All / Published / Draft status tabs
  • Table Columns: ID, Title, Category, Type, Priority, Updated Date, Actions (Edit/Delete)
  • Inline Editing: Click an entry to edit it directly in the list
  • Sorting: Click column headers to sort by that column

Free Edition

The Free edition has no artificial limits on the number of knowledge base entries. Add as many Q&A pairs as your site requires.

The Pro edition adds advanced features on top of unlimited entries, such as:

  • Draft status for entries under review
  • Knowledge versioning and change history
  • Auto-priority based on usage frequency
  • Expiration dates for time-sensitive content
  • Related links between entries
  • Intent classification
  • AI-powered FAQ auto-generation from knowledge gaps
  • Similar question merge detection

Site Learning (Crawler) PRO

Site Learning automatically crawls your WordPress content and makes it available as context for the AI chatbot. Navigate to AI Chatbot > Site Learning.

Overview

The crawler reads your WordPress posts, pages, and custom post types, splits the content into chunks, and stores them in the wp_aichat_index database table with FULLTEXT indexing. When a user asks a question, the plugin searches this index for relevant content and provides it as context to the AI.

This enables the chatbot to answer questions about your site’s content (blog posts, product pages, documentation, etc.) without requiring manual knowledge base entries for each topic.

Note: In the Free edition, the Site Learning menu item is visible but displays a Pro upgrade page. The crawler functionality and all settings below require the Pro edition. The Knowledge Base (Free) is the alternative for providing specific Q&A pairs to the AI.

Status Panel PRO

When Pro is active, the Site Learning page shows a status panel with:

Status ItemDescription
Learning StatusEnabled or Disabled indicator
Indexed PagesNumber of content chunks stored in the index
Last Crawl DateWhen the crawler last ran
WooCommerce DetectionShows whether WooCommerce is detected, enabling automatic product data crawling
Embedding StatusShows the embedding provider, model, and progress (embedded chunks / total chunks with a progress bar)

Enable Crawler PRO

Enables or disables the automatic content crawler.

Enabled: Periodically crawls specified post types, splits content into chunks, and stores in the search index. Relevant content is automatically included in AI responses as context.

Disabled: No crawling. The chatbot uses only the manually registered knowledge base entries.

Default: Enabled

Post Types PRO

Which WordPress post types to crawl and index.

Default: All — Crawls all public post types (posts, pages, custom post types including WooCommerce products).

You can select specific types to limit the scope of crawling. Options include posts, pages, and any registered custom post types.

Additional crawl settings available in Pro:

  • Excluded Content: Specific pages or posts to skip during crawling
  • Custom Fields: Include custom field data in the crawl
  • Crawl Depth: How deep to crawl linked content

Crawl Interval PRO

How often the crawler runs automatically via WordPress cron.

OptionDescription
Daily DefaultCrawls once per day. Best for frequently updated sites
WeeklyCrawls once per week. Best for sites with stable content

A manual crawl button is also available on the Site Learning page for immediate indexing. The Pro edition also supports differential crawling (only new/changed content) and scheduled crawls at specific times.

Chunk Size PRO

Maximum characters per content chunk when splitting crawled content.

Default: 1000 characters

Size RangeProsCons
500-800More precise search matchingLarger index, may fragment context
800-1200Good balance of precision and contextDefault range, works well for most sites
1500-2000Broader context per chunkPotentially less precise result matching

Max Results PRO

Maximum number of content chunks included in the AI context per user query.

Default: 3

CountProsCons
1-2Saves API costs and token usageMay miss relevant information
3-5Good balance of context and costModerate token usage
5-10Comprehensive context coverageHigher API costs per message
Tip: The Knowledge Base (Free) is best for specific FAQ-style Q&A pairs with guaranteed accurate answers. Site Learning (Pro) is best for making your entire site’s content searchable without manual entry. For the best results, use both together — the knowledge base for critical Q&A and site learning for broad content coverage.

Conversations PRO

View and manage chat conversation history. Navigate to AI Chatbot > Conversations.

Overview

The Conversations page provides a comprehensive view of all chat sessions between visitors and the AI chatbot. You can search, filter, export, and review individual conversations to understand user needs and improve the chatbot’s effectiveness.

Note: In the Free edition, the Conversations menu item is visible but displays a Pro upgrade page. Conversation data is still stored in the database (when Save History is enabled) but cannot be viewed through the admin interface without the Pro plugin.

Statistics Cards PRO

Six summary cards at the top of the Conversations page:

CardDescription
TotalTotal number of conversations in the database
ActiveConversations currently in progress (recent activity)
ClosedConversations that have ended (no activity within timeout period)
TodayConversations started today
ArchivedConversations manually archived by admin
HandoffConversations escalated to human agents

Conversation List PRO

The main table shows all conversations with:

  • Search and Filter: Search by message content, filter by status, and date range
  • Bulk Operations: Select and delete multiple conversations, reset all sessions
  • Table Columns: ID, Session ID, Message Count, Lead info, Start Page, Status, Handoff status, Start Time, Last Update, Actions
  • Pagination: Navigate through large conversation lists

Message View PRO

Click a conversation to view the full chronological exchange between user and AI. Features include:

  • Full message history with timestamps
  • Feedback ratings (thumbs up/down) displayed alongside messages
  • User information (session details, browser, IP)
  • Conversation summary generation
  • Conversation tagging for organization

Export PRO

Export conversation data in CSV or JSON format with optional date range filtering. Useful for external analysis, compliance records, or backup.

Analytics PRO

Comprehensive analytics dashboard for understanding chatbot performance and user engagement. Navigate to AI Chatbot > Analytics.

Overview

The Analytics page provides detailed insights into how visitors interact with your chatbot. In the Free edition, this page shows a preview with sample data to demonstrate the available metrics. Full functionality requires the Pro edition.

Note: In the Free edition, the Analytics menu item displays a preview page with sample data and charts. This demonstrates what the Pro analytics dashboard offers. Actual analytics data collection and display require the Pro plugin.

Features PRO

The Pro analytics dashboard includes:

Time Period Selection: View data for the last 7, 30, or 90 days. Print or export as PDF.

Statistics Cards:

  • Total conversations and messages
  • Average messages per conversation
  • User satisfaction score (from feedback)
  • Estimated API cost for the period
  • AI quality score
  • Bounce rate (single-message conversations)

Charts and Graphs:

  • Conversation dropout distribution (where users leave)
  • Daily conversation volume (line chart)
  • Hourly distribution (when users are most active)
  • Daily cost trends
  • Model-wise cost breakdown
  • Feedback trends over time

Tables and Reports:

  • Most frequently asked questions
  • Top pages where chatbot is used
  • Device statistics (desktop, mobile, tablet)
  • Country-wise usage statistics
  • Feedback analysis with satisfaction breakdown
  • Knowledge gaps (questions the chatbot could not answer)
  • Low-rated feedback entries for improvement

Leads PRO

View and manage lead capture form submissions collected through the chatbot. Navigate to AI Chatbot > Leads.

Overview

The Leads page displays all contact information collected through the chatbot’s lead capture form. Lead capture is a Pro feature that allows you to collect visitor details (name, email, phone, company, custom fields) before or during a chat conversation.

Note: In the Free edition, the Leads menu item is visible but displays a Pro upgrade page. Lead capture functionality, including form configuration and data collection, requires the Pro plugin.

Features PRO

  • Search and Filter: Search by name, email, or company. Filter by date range
  • Statistics Cards: Total leads, today’s leads, this week, this month
  • Lead Table: Name, Email, Phone, Company, Type (lead/offline), Conversation link, Date, Actions
  • Export: CSV and JSON export with date range filtering
  • Conversation Link: Each lead links to the associated conversation for full context
  • Webhook Integration: Automatically send lead data to external CRMs via webhook
  • Email Notifications: Receive email alerts when new leads are captured
  • Custom Fields: Capture additional custom information specific to your needs

Audit Log PRO

Track and review administrative actions taken within the plugin. Navigate to AI Chatbot > Audit Log.

Overview

The Audit Log records all significant administrative actions performed within the plugin, providing an accountability trail for multi-user WordPress installations.

Note: In the Free edition, the Audit Log menu item is visible but displays a Pro upgrade page. Audit logging functionality requires the Pro plugin.

Features PRO

  • Filter by Action Type: Filter logs by action categories (settings change, knowledge edit, data export, etc.)
  • Date Range Filter: View logs for specific time periods
  • Search: Search log entries by keyword
  • CSV Export: Export filtered logs as CSV for compliance or review
  • Log Entry Details: Each entry shows the date/time, action type (color-coded by severity), user who performed the action, target object, and details of the change
  • Retention Policy: Configure how long audit logs are retained
  • Severity Levels: Actions are categorized by severity (informational, warning, critical) with visual color coding

Developer Reference

The plugin provides WordPress filters and a REST API for developers to customize behavior programmatically.

WordPress Filters

Use these filters in your theme’s functions.php or a custom plugin to modify plugin behavior.

FilterParametersDescription
wpaic_system_prompt$prompt (string)Modify the system prompt sent to the AI provider. Receives the configured system prompt and should return a modified string.
wpaic_context$context (string)Modify the RAG context retrieved from site learning and knowledge base before it is sent to the AI.
wpaic_ai_response$response (string)Filter the AI response before it is displayed to the user. Useful for adding disclaimers, links, or post-processing text.
wpaic_chatbot_enabled$enabled (bool)Control chatbot visibility per page. Return false to hide the chatbot on specific pages based on custom logic.
wpaic_allowed_origins$origins (array)Add allowed origin hostnames for cross-site embedding. Return an array of domain strings (without protocol).
wpaic_gpt5_token_multiplier$multiplier (int)Adjust the GPT-5 reasoning token multiplier (default: 4, range: 1-8). Higher values allocate more tokens for reasoning models.
wpaic_chat_response_data$data (array)Filter chat response data before returning to the client. Receives the full response array including message, tokens, etc.
wpaic_manage_cap$capability (string)Change the required WordPress capability for managing the plugin. Default: manage_options (Administrator). Change to edit_posts to allow Editors access.
wpaic_trusted_proxies$proxies (array)Add trusted proxy IPs/CIDRs for X-Forwarded-For parsing. Return an array of IP addresses or CIDR ranges.

Filter Usage Examples:

Add a disclaimer to all AI responses:

add_filter('wpaic_ai_response', function($response) {
    return $response . "\n\n---\n*This is an AI-generated response. For official information, please contact our support team.*";
});

Hide chatbot on WooCommerce checkout pages:

add_filter('wpaic_chatbot_enabled', function($enabled) {
    if (function_exists('is_checkout') && is_checkout()) {
        return false;
    }
    return $enabled;
});

Add context from a custom source:

add_filter('wpaic_context', function($context) {
    // Add custom business data to the AI context
    $hours = get_option('business_hours');
    if ($hours) {
        $context .= "\n\nBusiness Hours: " . $hours;
    }
    return $context;
});

Allow Editors to manage the chatbot:

add_filter('wpaic_manage_cap', function($cap) {
    return 'edit_posts'; // Editors and above can manage
});

Allow cross-site embedding from specific domains:

add_filter('wpaic_allowed_origins', function($origins) {
    $origins[] = 'partner-site.com';
    $origins[] = 'marketing.example.com';
    return $origins;
});

REST API Endpoints

The plugin exposes a REST API under the wp-ai-chatbot/v1 namespace. All endpoints require a valid WordPress nonce for authentication (automatically included when using the chat widget).

MethodEndpointPurposeAuth
GET/sessionGet or create a chat session. Returns a session ID for subsequent requestsNonce
POST/chatSend a user message and receive an AI response. Includes context from knowledge base and site learningNonce
GET/history/{session_id}Retrieve conversation history for a given sessionNonce
POST/feedbackSubmit feedback (thumbs up/down) for a specific messageNonce
POST/regenerateRegenerate an AI response for the last user messageNonce
GET/summary/{session_id}Generate an AI-powered conversation summaryNonce
GET/message-limitCheck message quota status (always returns unlimited; retained for backward compatibility)Nonce
POST/leadSubmit a lead capture form (Pro)Nonce
GET/lead-configGet lead form field configuration (Pro)Nonce
POST/suggestionsGet AI-generated related question suggestions (Pro)Nonce
POST/autocompleteGet input autocomplete suggestions (Pro)Nonce
POST/GET/mcpMCP server endpoint for external AI toolsBearer token

Pro-only Additional Endpoints:

MethodEndpointPurpose
GET/pro-configGet Pro feature configuration for the frontend
POST/save-contextSave cross-session user context memory
POST/conversionTrack conversion events
POST/offline-messageSubmit offline message form
GET/templatesGet answer templates for operator mode

Example: Sending a chat message via cURL:

curl -X POST "https://example.com/wp-json/wp-ai-chatbot/v1/chat" \
  -H "Content-Type: application/json" \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -d '{
    "message": "What are your business hours?",
    "session_id": "abc123"
  }'

Database Tables

The plugin creates the following tables (prefixed with your WordPress table prefix + aichat_):

TablePurposeKey Columns
wp_aichat_conversationsChat session recordsid, session_id, status, started_at, updated_at, ip_address, user_agent, page_url
wp_aichat_messagesIndividual messages within conversationsid, conversation_id, role (user/assistant/system), content, feedback (1/-1/null), cache_hash, cache_hit, tokens_input, tokens_output, created_at
wp_aichat_indexCrawled site content index for RAGid, post_id, chunk_index, content, embedding (vector data), post_type, created_at
wp_aichat_knowledgeKnowledge base Q&A entriesid, question, answer, category, priority, status, type, embedding, created_at, updated_at
wp_aichat_leadsLead capture form submissionsid, conversation_id, name, email, phone, company, custom_fields (JSON), type, created_at

Pro-only Tables:

TablePurpose
wp_aichat_user_contextCross-session context memory for returning users (auto-created on first use)
wp_aichat_audit_logAdministrative action audit trail with severity levels and user attribution

Tables are created by the plugin activator on activation. The Pro plugin uses the same tables (shared database) and does not create its own tables — Pro-specific tables are auto-created when the feature is first used.

Note: The wp_ prefix shown above is the default WordPress table prefix. Your actual prefix may differ based on your WordPress configuration (check $table_prefix in wp-config.php).
タイトルとURLをコピーしました