=== Benachat ===
Contributors: benapole
Tags: chatbot, ai, chat, support, assistant
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Train an AI chatbot on your own WordPress content and show a customizable chat widget, using your own AI provider API key.

== Description ==

Benachat AI Chatbot lets you build a support chatbot from the content you already have in WordPress: posts, pages, custom post types, pasted text, uploaded documents or fetched URLs.

You bring your own API key from the AI provider of your choice. Your training content stays in your own WordPress database, and chat requests go directly from your server to the provider you configured — no account, subscription or middle-man service is required.

Features:

* Bring your own API key (free provider tiers are supported)
* Train on posts, pages, custom post types, pasted text, uploaded documents or fetched URLs
* Chat widget with fullscreen mode and quick reply suggestions
* Appearance customization: colors, gradient, avatar, launcher icon, position, corner radius, dark mode
* Choose exactly which pages show the widget (everywhere / include / exclude)
* Auto-open, mobile handling, logged-in-only mode and the `[benachat]` shortcode
* Master on/off switch and a guided setup

== Installation ==

1. Upload the `benachat` folder to `/wp-content/plugins/`, or install the ZIP from Plugins → Add New → Upload Plugin.
2. Activate the plugin.
3. Go to **Benachat → Connection** and paste the API key of the AI provider you want to use.
4. Go to **Benachat → Training** and import your content.
5. Customize under **Benachat → Appearance** and **Display Rules**.

== Frequently Asked Questions ==

= Do I need an account with the plugin author? =

No. The plugin only needs an API key from the AI provider you choose. The plugin never contacts the author's servers.

= Which AI providers are supported? =

Groq, Cerebras, OpenAI, OpenRouter, Anthropic, Google Gemini, Mistral, DeepSeek, Together AI, and any OpenAI-compatible endpoint you enter yourself.

= Where is my data stored? =

Training content is stored in your own WordPress database. Chat messages are sent only to the AI provider you configured, using your own API key.

== External services ==

This plugin does not connect to any service of its own. It connects **only** to the AI provider that you select and configure with your own API key, and only in order to generate chat answers.

**What data is sent and when:** when a visitor sends a message in the chat widget (or you use the "test" action in the admin), the plugin sends that message, the recent messages of the same conversation, your configured system prompt, and the matching excerpts from your own training content to the provider endpoint, authenticated with your API key. Nothing is sent when the widget is idle, and no data is sent if no API key is configured.

Additionally, if you use **Training → Import from URL**, the plugin fetches the exact URL you enter so its text can be added to your knowledge base. No data other than the standard HTTP request is sent to that address.

You choose one of the following providers; its terms and privacy policy apply to the data sent:

* **Groq** — endpoint `https://api.groq.com/openai/v1/chat/completions`. Terms: https://groq.com/terms-of-sale/ — Privacy: https://groq.com/privacy-policy/
* **Cerebras** — endpoint `https://api.cerebras.ai/v1/chat/completions`. Terms: https://www.cerebras.ai/terms-of-service — Privacy: https://www.cerebras.ai/privacy
* **OpenAI** — endpoint `https://api.openai.com/v1/chat/completions`. Terms: https://openai.com/policies/terms-of-use/ — Privacy: https://openai.com/policies/privacy-policy/
* **OpenRouter** — endpoint `https://openrouter.ai/api/v1/chat/completions`. Terms: https://openrouter.ai/terms — Privacy: https://openrouter.ai/privacy
* **Anthropic** — endpoint `https://api.anthropic.com/v1/messages`. Terms: https://www.anthropic.com/legal/consumer-terms — Privacy: https://www.anthropic.com/legal/privacy
* **Google Gemini** — endpoint `https://generativelanguage.googleapis.com/v1beta/openai/chat/completions`. Terms: https://ai.google.dev/gemini-api/terms — Privacy: https://policies.google.com/privacy
* **Mistral AI** — endpoint `https://api.mistral.ai/v1/chat/completions`. Terms: https://mistral.ai/terms — Privacy: https://mistral.ai/terms#privacy-policy
* **DeepSeek** — endpoint `https://api.deepseek.com/chat/completions`. Terms: https://platform.deepseek.com/downloads/DeepSeek%20Terms%20of%20Use.html — Privacy: https://platform.deepseek.com/downloads/DeepSeek%20Privacy%20Policy.html
* **Together AI** — endpoint `https://api.together.xyz/v1/chat/completions`. Terms: https://www.together.ai/terms-of-service — Privacy: https://www.together.ai/privacy
* **Custom OpenAI-compatible endpoint** — the address you enter yourself; the terms and privacy policy of that service apply.

== Privacy ==

The plugin collects no analytics and sends no data to the plugin author. Chat messages are transmitted only to the AI provider you configured. If you enable the optional "Powered by" credit in the widget (disabled by default), a link to the author's site is shown in the widget; no data is sent by displaying it.

== Screenshots ==

1. Dashboard with guided setup and live widget preview.
2. Connection page with provider and model selection.
3. Training page with content import and knowledge base.
4. Appearance page with full widget customization.

== Changelog ==

= 1.0.0 =
* Initial release.
