# AI App Onsite

**Contributors:** aiapponsite  
**Tags:** ai, gpt, ai-app, app-builder  
**Requires at least:** 4.7  
**Tested up to:** 6.7.1  
**Stable tag:** 1.2.8
**Requires PHP:** 7.0  
**License:** GPLv2 or later  
**License URI:** [https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html)

Add AI-powered apps to any site in minutes. Forget OpenAI “GPTs” or Claude “Projects”. The power of AI is now in your hands (and on your website)!

---

## Description

AI App Onsite enables you to add AI-powered applications to any page on your WordPress site quickly and easily. With no coding required, you can create and customize AI apps with full control over fields, layout, styling, and functionality—all from within the WordPress backend.

### Features

- **Add App To Any Page On Your Site (And Promote To Your Audience):** Leverage all the power and capabilities of the latest AI foundation models and API options to create any kind of app. If you can imagine it you can build it.
- **Build Your App Inside WordPress (In 6 Steps):** You can build your AI app from start to finish using an easy 6 step process, right in the WordPress backend. No other server-side dependencies and everything runs on your site.
- **You Control Fields, Layout, Styling & Functionality:** Make the look and feel of your app match the style of your site, and customize the functionality for a powerful user experience tailored to your visitor needs.
- **Customize AI Prompts & Inputs:** AIappOnsite offers site owners full control over their app functionality including AI prompts and data, as well as AI model selection and parameter settings. If AI can do it, you can deliver it on your site.
- **Using Your API Key Means Lower Cost:** Get excellent value and low operational cost with a simple ‘bring your own key’ system. No paid credits or confusing tiers, just a simple flat rate subscription fee.

### Two Huge Benefits of Using AI App Onsite

- **Create Powerful Lead Magnets:** Having an AI app right on your site generates immediate value and feedback, sets you apart from your competitors and can even be a powerful magnet for links from industry news and media sites.
- **Dramatically Increase Conversions:** Turn more site visitors into engaged prospects and significantly increase customer data capture by providing real time feedback and answers to their specific client inputs and queries.

---

## Installation

1. Download the plugin files and upload them to the `/wp-content/plugins/ai-app-onsite` directory.
2. In the WordPress admin panel, go to **Plugins > Installed Plugins** and click **Activate** next to "AI App Onsite".
3. Configure your settings by navigating to **AI App Onsite** in the WordPress admin sidebar.

---

## Frequently Asked Questions

### How do I set up my first AI app using AI App Onsite?

After activating the plugin, go to the **AI App Onsite** menu in the WordPress dashboard and follow the six-step process to create your app.

### Can I customize the AI prompts and model settings?

Yes, AI App Onsite allows full customization of AI prompts, model parameters, and field settings to align with your specific use case and audience.

### Do I need an API key to use this plugin?

Yes, AI App Onsite requires you to bring your own API key, allowing for straightforward cost control and usage.

---

## Screenshots

1. **Plugin Settings Screen** – Configure basic settings for your app  
   ![Plugin Settings](AIappOnsite-PluginSettings.png)
2. **Model Settings Screen** – Select and configure the AI model for your app  
   ![Model Settings](AIappOnsite-ModelSettings.png)
3. **Field Selector** – Set up app fields and properties for visitor interactions  
   ![Field Selector](AIappOnsite-FieldSelector.png)
4. **Prompt Editor** – Enter and refine the AI prompt for your app  
   ![Prompt Editor](AIappOnsite-PromptEditor.png)

---

## Changelog

### 1.0.0
- Initial release.
### 1.1.0
- CSS issue & Auto open last tab

### 1.4.3 
- Fix - the app would not load correctly on some themes.
- Update - Improved compatibility with the latest WordPress version.
- Update - Updated the plugin to use the latest API endpoints for better performance and reliability.
- Fix - Enhanced the user interface for easier navigation and app creation.
- Fix - Improved error handling and user feedback during app interactions.
- Add - Added a new feature to allow users to save and create multiple app configurations for easier management.
- Update - Enhanced security measures to protect user data and API keys.
- Add - Added a new feature to allow users to preview their app with shadow and border-radius settings before publishing.
- Update - Field selector now supports more number of fields.

### 1.2.4.2
- **Default Value Handling**:  
  Ensured default values for `app_corner` and `app_height` are applied if missing in the app settings, preventing layout issues during app rendering.

- **Database Update Format Fix**:  
  Resolved an issue in the `$wpdb->update()` call where a missing `%s` in the format array caused incorrect or failed updates to `app_height` in the `app_settings` table.

- **Database Schema Auto-Fix on Upgrade**:  
  Added a safe check during plugin upgrade to ensure `app_corner` and `app_height` columns exist in the `app_properties` table. If missing, they are automatically added without requiring manual database migration.

### 1.2.4.3
- Resolved an issue where plugin activation failed due to $wpdb being undefined inside a schema update closure.

### 1.2.5
- Terms  & Condition UI 
* Improved UI for Terms & Conditions acceptance. 
* New prompt editor with better UX.   
* Fixed Bug affecting token counter in prompt editor.
* Post Response Message UI added to app details.

### 1.2.6
* Added Webhook Support.
* Added Ability to Define Anchor Text and Embed Links in AI Results Output.
* Change Field Name/Label in Tab 1 (App Settings).
* Added User Stats Capture, Retention and Reporting Features.
* Added Client and Server Support For Periodic Data Pushes of Anon Data to AIAO DB.
* Added 'Export/Download PDF' Feature to Output/Results Page.
* Update OpenAI Model Support List - PHASE 1
* Added Local Logging of Useful Info (version change, etc for troubleshooting).
* Change (Delay) Data Share Email Until After AI Response (and Include AI Output).
* Add/Change Content to ToS and Enhance to Alert Existing Users of Changes.
* Fixed "Response Message" Box, Label, Format, etc.
* Prompt Formatting Not Saving After Version Upgrade.
* Changed Note Copy in API Key Management Window.
* Fetch Premium Pkg On Plugin Upgrade.
* Added App Name To Input Data Email

---

## Upgrade Notice

### 1.0.0
- First release of AI App Onsite, offering AI-powered app creation and customization within WordPress.

### 1.2.0
- First release of AI App Onsite, offering AI-powered app creation and customization within WordPress.

#### 1.2.3
- Premium features added, including advanced model settings and field customization options.

### 1.2.4
- Bug Fixes and performance improvements. Plugin Urgent Update: Resolved a critical issue regarding access key validation.

### 1.2.4.2 
- Fixed bugs affecting app preview rendering and live app behavior.
- Improved database handler consistency for better reliability.

### 1.2.4.3 
- Resolved an issue where plugin activation failed due to $wpdb being undefined inside a schema update closure.

### 1.2.5
- Terms  & Condition UI 
* Improved UI for Terms & Conditions acceptance. 
* New prompt editor with better UX.   
* Fixed Bug affecting token counter in prompt editor.
* Post Response Message UI added to app details.

### 1.2.6
- Added Webhook Support.
- Added Ability to Define Anchor Text and Embed Links in AI Results Output.
- Improved UI for App Settings & App Details.
- Added User Stats Capture, Retention and Reporting Features.
- Added 'Download PDF' Feature to Output/Results Page.
- Added OpenAI Model Support List.
- Added Local Logging of Useful Info (version change for troubleshooting).
- Added AI Output to user email.
- Fixed Prompt Formatting.
- Bug Fixes & performance improvements.

### 1.2.7
- AIAO-77: Fixed App Name/Short Code Character limit.
- AIAO-60: Expanded Char Limits on All Fields App Description, Disclaimer, Sample Text.
- AIAO-61: Fixed Disconnect Field ID From Field Label.
- AIAO-81: App Response Window Style Improved.
- AIAO-82: Made App Button like Submit & Try Again BG & Font Color Configurable.
- AIAO-83: Ehancements : Red Asterisk, Email Validation, App Width Resposition etc.
- AIAO-85: Ehancements to color settings.
- AIAO-86: Response Bg Preview + Hide Include Email/Export + App Name Character Counter Added.


### 1.2.8
- SPRN-7-001: 
- SPRN-7-002: New app (after first) should not force a API key check.
- AIAO-59: Add Gradient Style Option for App Background.
- AIAO-62: Export App Templates to other sites.
- AIAO-74: Add "Today" Option on User Stats Drop-Down.
- AIAO-76: PDF Export template optimized.
- AIAO-87: Fixed Field Selector Widget Reorder Flow
- SPRN-7-003: New Reference Content for the ability to expose LLM to website content.
- AIAO-66: Added auto save on app selection.
---

## External Services

This plugin connects to the following third-party APIs:

### 1. [OpenAI](https://openai.com)

- **Purpose:** To generate AI-based chat responses.
- **Data Sent:** User inputs from the chat form
- [Terms of Service](https://openai.com/policies/terms-of-use), [Privacy Policy](https://openai.com/policies/privacy-policy)
