=== WebBitFlow AI Chat Widget ===
Contributors: webbitflow, rickysalazar
Tags: ai chatbot, claude, chatgpt, gemini, ai assistant
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A white-label AI Chatbot widget for WordPress. Connect DeepSeek, Gemini, ChatGPT, Claude, and custom LLMs while protecting your API.

== Description ==

WebBitFlow AI Chat Widget integrates an artificial intelligence conversational widget into your WordPress site. It allows site administrators to connect multiple AI providers to handle customer inquiries directly from the frontend.

The plugin includes built-in security controls, such as IP-based Rate Limiting, anti-CSRF WordPress Nonces, and API Key encryption (AES-256-CBC) to prevent unauthorized API token consumption.

### Features
* **Multi-Provider Support:** Connect with Google Gemini, DeepSeek, ChatGPT, Claude, and Xiaomi MiMo.
* **White-Label Customization:** Customize primary colors, text colors, chatbot identity, and avatar settings directly from the admin dashboard.
* **Security Controls:** Built-in IP rate limiting and session nonces to manage API requests safely.
* **Document Parsing:** Option to attach PDF documents to extend the chatbot knowledge base.
* **Asynchronous Integration:** Built using native JavaScript Fetch API for asynchronous communication without affecting page rendering performance.
* **Session Context:** Maintains conversation context within the active user session.

### Configuration Guide
1. Go to the plugin settings page in your WordPress Admin dashboard.
2. Select your preferred AI Provider and Model.
3. Enter your provider's API Key.
4. Customize the widget branding (colors, titles, and disclaimer text).
5. Save changes. The chatbot widget will automatically render on your site based on your settings.

### 💼 Need Custom AI Implementation?
This plugin is maintained by **WebBitFlow**, a professional computer systems and technical agency specializing in advanced software architecture, and custom web platforms. If you need tailor-made AI training, custom integrations, or enterprise deployments, visit us at [WebBitFlow](https://webbitflow.com).

== External services ==

This plugin connects to external AI provider APIs to generate chat responses when a site visitor interacts with the chatbot widget. Connections are only made when an end-user sends a message and a valid API key is configured by the site administrator.

Data sent includes:
* User prompt text and session conversation history.
* Configured system instructions or optional attached document context (PDF text).

This plugin connects to the following third-party services depending on the provider selected by the site administrator:

* **Google Gemini API** (Google LLC)
  * Used for: Generating AI chat responses using Google Gemini models.
  * Terms of Service: https://policies.google.com/terms
  * Privacy Policy: https://policies.google.com/privacy

* **OpenAI API** (OpenAI, L.L.C.)
  * Used for: Generating AI chat responses using ChatGPT/GPT models.
  * Terms of Service: https://openai.com/policies/terms-of-use/
  * Privacy Policy: https://openai.com/policies/privacy-policy/

* **Anthropic Claude API** (Anthropic PBC)
  * Used for: Generating AI chat responses using Claude models.
  * Terms of Service: https://www.anthropic.com/legal/consumer-terms
  * Privacy Policy: https://www.anthropic.com/legal/privacy

* **DeepSeek API** (DeepSeek AI)
  * Used for: Generating AI chat responses using DeepSeek models.
  * Terms of Service: https://www.deepseek.com/terms
  * Privacy Policy: https://www.deepseek.com/privacy

* **Xiaomi MiMo API** (Xiaomi Inc.)
  * Used for: Generating AI chat responses using Xiaomi MiMo models.
  * Terms of Service: https://www.mi.com/global/about/agreement/
  * Privacy Policy: https://privacy.mi.com/all/languages/

== Installation ==

1. Upload the `webbitflow-ai-chat-widget` folder to the `/wp-content/plugins/` directory, or upload the ZIP file directly through the WordPress admin dashboard.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to the new **WEBBITFLOW AI Chat** menu on your admin sidebar.
4. Paste your encrypted API Key, choose your preferred LLM provider, customize your widget colors, and click Save.

== Frequently Asked Questions ==

= Does this plugin store my conversations? =
No. Conversation history is kept exclusively within the user's browser session (sessionStorage) for context memory, ensuring strict data privacy.

= Where is my API Key stored? =
Your API Key is encrypted using military-grade AES-256-CBC symmetric encryption before being saved to the database, utilizing your unique `wp-config.php` salts.

= Do I need a paid subscription? =
No. The plugin is 100% free. You only pay for your direct API consumption with your chosen provider (e.g., Google or DeepSeek), which is significantly cheaper than monthly chatbot software retainers.

== Changelog ==

= 1.0.0 =
* Initial release.
* Added native integration for Google Gemini, Claude, ChatGPT, MiMo and DeepSeek.
* Implemented IP Rate Limiting and AJAX Security Nonces.
* Implemented AES-256-CBC database encryption for options payload.