=== Botshido ===
Contributors: algenialab, freemius
Tags: chatbot, ai, chat, openai, assistant
Requires at least: 5.4
Tested up to: 7.1
Requires PHP: 7.0
Stable tag: 1.2.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI chatbot for WordPress with knowledge base, analytics and shortcode integration. Bring your own OpenAI, Mistral, Anthropic or Grok key.

== Description ==

Botshido adds an AI-powered chat widget to your WordPress site. Connect it to your preferred LLM provider, feed it your site content through the built-in knowledge base, and customize every aspect of its appearance and behavior.

**Free features**

* One chatbot with its own prompts, provider, model, tone, and appearance
* Supported LLM providers, all included: OpenAI, Mistral AI, Anthropic (Claude), xAI (Grok). No message limits: you pay your provider directly
* Knowledge base from your posts and pages, FAQ pairs and training text or files, with keyword search
* Floating chat widget or `[botshido]` shortcode placement
* Quick questions and simple content blocks, with keyword and message-count triggers
* Analytics: events and funnel counters
* GDPR tools: consent notice, data retention, WordPress privacy exporter/eraser integration
* Three bundled chatbot templates with avatars: Ninji, Leo and Aria; one-step undo after applying a template; import of template files (ZIP)
* Setup wizard, conversation history
* Multilingual-ready, with WPML/Polylang integration

**Pro features**

Botshido Pro is a separate paid license, bought on botshido.com. The code for these features is not part of the Free plugin:

* Unlimited chatbots and a public chatbot switcher
* Guided conversational flows, lead collection, advanced triggers
* Human handoff with availability hours and operator notifications
* Embedding-based (semantic) retrieval and URL import for the knowledge base
* A/B testing of opening messages and analytics CSV export
* WooCommerce integration
* Online template library, template export and creation of chatbots from templates

**API keys**

You need an API key from at least one supported provider. Keys can be stored in the plugin settings or defined as PHP constants (`NINJAIBOT_OPENAI_API_KEY`, `NINJAIBOT_MISTRAL_API_KEY`, `NINJAIBOT_ANTHROPIC_API_KEY`, `NINJAIBOT_GROK_API_KEY`) in `wp-config.php`.

== External services ==

This plugin connects to third-party AI services to generate chat responses and (optionally) text embeddings for the knowledge base. Requests are only sent to the provider you configure, and only when a visitor uses the chat (or when the knowledge base is indexed with embeddings enabled).

What is sent: the visitor's chat messages, the conversation context, your configured prompts, and relevant excerpts of your indexed site content. Your API key is sent to authenticate each request.

* **OpenAI** (api.openai.com) — chat responses and embeddings. [Terms of use](https://openai.com/policies/terms-of-use), [Privacy policy](https://openai.com/policies/privacy-policy)
* **Mistral AI** (api.mistral.ai) — chat responses and embeddings. [Terms of service](https://mistral.ai/terms/), [Privacy policy](https://mistral.ai/terms/#privacy-policy)
* **Anthropic** (api.anthropic.com) — chat responses. [Terms of service](https://www.anthropic.com/legal/consumer-terms), [Privacy policy](https://www.anthropic.com/legal/privacy)
* **xAI** (api.x.ai) — chat responses. [Terms of service](https://x.ai/legal/terms-of-service), [Privacy policy](https://x.ai/legal/privacy-policy)

Additionally, if you configure lead-collection webhooks or index external URLs into the knowledge base, the plugin sends requests to the hosts you explicitly allow via the `ninjaibot_allowed_webhook_hosts` filter. When enabled, the Pro online template library also contacts https://botshido.com/templates/ on an administrator’s catalog load/refresh or template selection. These requests do not send chatbot content or API keys. Bundled templates work without contacting the catalog.

**Freemius** (api.freemius.com, wp.freemius.com) — this plugin uses the Freemius SDK for licensing, updates and optional usage insights. Nothing is sent until an administrator opts in on the activation screen (it can be skipped). After opting in, Freemius receives the site URL, WordPress and PHP versions, the plugin version and the administrator's name and email address; it never receives chatbot conversations, your content or API keys. [Terms of service](https://freemius.com/terms/), [Privacy policy](https://freemius.com/privacy/)

== Installation ==

1. Upload the `botshido` folder to `/wp-content/plugins/`, or install through the WordPress plugins screen.
2. Activate the plugin. Activation creates the required database tables.
3. Go to **Botshido → Settings** and add the API key for your chosen LLM provider.
4. Enable the widget, or place the `[botshido]` shortcode in a post or page.

== Frequently Asked Questions ==

= Do I need an API key? =

Yes. The plugin does not ship with any AI service; you connect your own account with OpenAI, Mistral AI, Anthropic, or xAI. Usage is billed by the provider according to your plan with them.

= Is visitor data stored? =

Conversations and anonymized analytics events are stored in your WordPress database, with configurable retention periods. The plugin integrates with the WordPress privacy tools (data export and erasure).

= Can I run more than one chatbot? =

The free plugin runs one chatbot. Botshido Pro lets you create as many as you need, each with its own configuration, provider settings, and appearance.

= What do templates include? =

Free includes Ninji, Leo and Aria with their prompts, colors and avatars. Applying a template replaces its supported prompt and appearance fields; it preserves API keys, knowledge and conversations. Undo restores the last application. Updating the plugin does not automatically reapply templates.

You can import a template file (ZIP, with images) in the free plugin. Botshido Pro adds the online template library, template export and creating chatbots from templates. JSON imports do not transfer images. ZIP requires the PHP ZIP extension.

== Changelog ==

= 1.2.2 =
* First public release.
