=== Oberon Chat – AI Chatbot, Support Agent & Lead Generator (ChatGPT, Gemini, Claude) ===
Contributors: oberonie
Tags: chatbot, ai, chatgpt, gemini, claude, support, automation
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Stable tag: 2.9.12
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Stop losing customers to slow support. Add a 24/7 AI sales and support agent to your site in minutes. Connect OpenAI, Google Gemini, or Anthropic Claude.

== Description ==

**Are you ignoring your visitors when you sleep?**

Most website visitors leave because they can't get answers fast enough. You can't be online 24/7—but Oberon Chat can.

Oberon Chat isn't just a "chatbot"; it is an **intelligent employee** that lives on your website. It answers questions, captures leads, and guides visitors to checkout while you sleep.

Unlike other plugins that lock you into expensive monthly subscriptions, **Oberon Chat gives you total control.** You connect directly to the world's smartest AI models (OpenAI, Gemini, Claude) using your own API keys. No middleman fees. No data lock-in.

### 🚀 Why Oberon Chat? (The Exceptional Benefits)

* **Never Miss a Lead Again:** Engage every visitor instantly, 24/7/365.
* **Cut Support Costs:** Let AI handle the repetitive questions so you can focus on growing your business.
* **Total Privacy Control:** Your data stays with you. We don't proxy your conversations.
* **Pay Less:** Don't pay a plugin subscription markup. Pay the AI providers directly for exactly what you use (often pennies per month).

### 🧠 Smart Features for Growth

* **Multi-Brain Power:** Switch between **ChatGPT (OpenAI)**, **Google Gemini**, or **Anthropic Claude** to find the smartest model for your needs.
* **Instant Personality:** Use our "Prompt Presets" to instantly turn your bot into a **Support Agent**, **Sales Rep**, or **Product Expert** with one click.
* **The Transcript Vault:** automatically captures every conversation. See exactly what your customers are asking and export leads directly to your CRM.
* **Brand-Perfect Design:** Customize the chat bubble, colors, and greetings to look like a native part of your brand, not a cheap add-on.

### 🛡️ Privacy & Trust (Freedom from Fear)

We take security seriously.
* **Direct Connection:** Chat data flows directly from your server to the AI provider.
* **History Trimming:** We automatically manage context to keep API costs low and relevance high.
* **GDPR Friendly:** You control the data. View, export, or delete transcripts instantly.

### ⚡ Get Started in 3 Baby Steps

1.  **Install** and Activate Oberon Chat.
2.  **Paste** your API Key (OpenAI, Gemini, or Claude).
3.  **Select** a System Prompt (e.g., "Customer Support").
*That's it! Your AI agent is live.*

---

### External Services & Data Transparency

To function, this plugin connects to the AI provider of your choice. You must have your own account/API key with these providers.

* **OpenAI:** Sends prompts/history to `https://api.openai.com/v1/chat/completions`.
    [OpenAI Terms](https://openai.com/policies/terms-of-use) | [Privacy Policy](https://openai.com/policies/privacy-policy)
* **Google Gemini:** Connects to `https://generativelanguage.googleapis.com/v1beta/models`.
    [Google API Terms](https://ai.google.dev/terms) | [Privacy Policy](https://policies.google.com/privacy)
* **Anthropic Claude:** Connects to `https://api.anthropic.com/v1/models`.
    [Anthropic Terms](https://www.anthropic.com/legal/terms-of-service) | [Privacy Policy](https://www.anthropic.com/legal/privacy)
* **OpenRouter:** Optional connection to `https://openrouter.ai/api/v1/models`.
    [OpenRouter Terms](https://openrouter.ai/terms) | [Privacy Policy](https://openrouter.ai/privacy)

== Installation ==

1.  Upload the `oberon-chat` folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the **Plugins** menu in WordPress.
3.  Navigate to **Oberon Chat → Settings** and enter your chosen API Key.
4.  Place the `[oberon_chat]` shortcode on any page (or enable the site-wide widget).

== Frequently Asked Questions ==

= Will this slow down my site? =
No. Oberon Chat is built for performance. Assets only load when required, ensuring your site speed scores remain high.

= Is this plugin free? =
The plugin is free to download and use. You only pay the AI provider (like OpenAI) for the actual text generated, which is usually very affordable.

= Can I train it on my own data? =
You can use the "System Prompt" area to paste specific instructions, business hours, or return policies that the AI will reference in every chat.

= Is it hard to set up? =
Not at all. If you can copy and paste an API key, you can use Oberon Chat. We have designed it to be "plug and play."

== Screenshots ==

1. **The "Brain" of your site:** Easily configure OpenAI, Gemini, or Claude settings.
2. **Brand-Ready Widget:** Fully customizable interface that matches your site's design.
3. **The Transcript Vault:** See exactly what your customers are asking in real-time.

== Changelog ==

= 2.9.12 =
* **Fix:** Resolved issue where cron job could send duplicate emails.

= 2.9.11 =
* **Update:** Maintenance release.

= 2.9.10 =
* **Dev:** Added debug_cron.php for troubleshooting.

= 2.9.9 =
* **Fix:** Forced cron scheduling on initialization to ensure automated emails run.

= 2.9.7 =
* **Fix:** Added detailed logging for automated transcript emails.

= 2.9.6 =
* **Fix:** Resolved scope error when accessing default options in Pro edition.

= 2.9.5 =
* **Fix:** Added error handling to manual transcript email actions.

= 2.9.4 =
* **Fix:** Resolved fatal error when manually emailing transcripts from the admin panel.

= 2.9.3 =
* **Update:** Maintenance release.

= 2.9.2 =
* **Update:** Maintenance release.

= 2.9.1 =
* **Fix:** Resolved undefined array key warnings in frontend localization for Community users.

= 2.9.0 =
* **Fix:** Resolved fatal error in settings sanitization for Community users.
* **Enhancement:** General stability improvements and build process updates.

= 2.7.0 =
* **New:** Streamlined OpenRouter conversations.
* **Update:** Refreshed default widget branding for a modern look.

== Upgrade Notice ==

= 2.9.1 =
Fixes PHP warnings in frontend script loading. Recommended for all users.

= 2.9.0 =
Critical fix for settings saving error. Please update immediately.
