=== LiikaChat ===
Contributors: liikainnovative
Donate link:
Tags: ai chatbot, chat, live chat, BYOK, ai assistant
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

LLM-native AI chatbot and hybrid support agent for WordPress with live-chat handover to human operators.

== Description ==

LiikaChat is a lightweight, LLM-native AI chatbot and hybrid support agent that runs entirely on your server. Bring your own API key (BYOK) and the assistant answers visitors using your site's content — posts, pages, and (with WooCommerce) your product catalog, orders, and cart.

Key features:

* **Server-side execution** — no mid-tier proxy; requests go directly from your server to the configured LLM provider.
* **RAG over your content** — the AI searches posts, pages, and WooCommerce products to answer with real, linked results.
* **WooCommerce tools** — product search, order status lookup (ownership-verified), cart links, and stock checks.
* **Hybrid live-chat handover** — visitors can request a human operator; admins answer from an in-dashboard live inbox with real-time streaming.
* **Action tools** — the assistant can perform cart and checkout actions for visitors.
* **BYOK provider engine** — OpenAI by default, plus DeepSeek, xAI/Grok, Gemini, OpenRouter, and custom OpenAI-compatible endpoints (Pro).
* **Summarized knowledge base (Pro)** — pre-indexed AI summaries of all site content reduce token usage and speed up answers.
* **Push notifications (Pro)** — instant Telegram and email alerts when a visitor requests a human operator.

The plugin respects your visitors' privacy: order and subscription lookups are limited to logged-in users by default.

To display the chat bubble, add the `[liikachat]` shortcode to any post, page, or widget.

== Frequently Asked Questions ==

= Which providers are supported? =

The free tier ships with OpenAI. Pro adds DeepSeek, xAI/Grok, Gemini, OpenRouter, and custom OpenAI-compatible endpoints.

= Does LiikaChat store API keys? =

Keys are encrypted at rest with `openssl_encrypt()` using your WordPress `AUTH_KEY` and are never exposed to client-side JavaScript.

= Does it work with WooCommerce? =

Yes. When WooCommerce is active the assistant can search products, check order status, manage cart links, and (when enabled) handle cart/checkout actions.

= How do I show the chat bubble with a shortcode? =

Add `[liikachat]` to any post, page, or Text widget.

= Can visitors talk to a human? =

Yes. A handover button in the widget routes the session to your admin live inbox, where an operator can take over and reply in real time.

== Screenshots ==

1. AI assistant answering a live product availability question with real store data.
2. Answering store operating hours from the knowledge base.
3. Summarizing a blog article for a visitor.

== External Services ==

This plugin connects to external services to provide AI chat functionality.

1. **OpenAI API (or any OpenAI-compatible endpoint)**
   - **What it does:** The plugin sends user messages to the configured AI API endpoint to generate chat responses.
   - **What data is sent:** The user's message content, the selected model name, and the user's own API key (configured by the site owner).
   - **When it is sent:** Data is sent only when a visitor submits a message through the chat widget.
   - **Service Provider:** OpenAI, or any third-party provider chosen by the user via custom endpoint configuration.
   - **Privacy Policy:** https://openai.com/policies/privacy-policy/
   - **Terms of Service:** https://openai.com/policies/terms-of-use/

   *Note: This plugin does NOT use a central API proxy. All API calls are made directly from the site owner's server to the configured endpoint, using the site owner's own API key.*

== Changelog ==

= 1.0.0 =
* Initial release.
* LLM-native AI chat widget with SSE token streaming.
* RAG tool calling over posts, pages, and WooCommerce catalog.
* Hybrid live-chat handover with admin live inbox.
* BYOK provider engine (OpenAI free; DeepSeek, xAI, Gemini, OpenRouter, custom in Pro).
* WooCommerce cart and checkout action tools.
* Secure order/subscription lookups (logged-in users only).
* Encrypted API key storage.

== Upgrade Notice ==

= 1.0.0 =
Initial release, no upgrade action required.
