=== AI Chatbot & Semantic Search: ChatGPT Answers From Your Content ===
Contributors: webdigit
Donate link: https://www.smartsearchwp.com/
Tags: ai chatbot, chatgpt, semantic search, woocommerce, ai assistant
Requires at least: 4.7
Tested up to: 7.1
Stable tag: 2.8.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html


Answers your visitors can trust, drawn from YOUR content. Self-hosted AI chatbot + semantic search (RAG), your OpenAI key, not generic ChatGPT.


== Description ==

Answers your visitors can trust, drawn only from your own content. SmartSearchWP turns your WordPress site into an AI assistant that replies from YOUR posts and pages, grounded in your data instead of generic ChatGPT answers. It pairs an AI chatbot with a semantic search engine (RAG) that retrieves the right passages from your content before it answers. It runs on your own site, with your own OpenAI key.

**Premium:** unlock all 10 premium add-ons (WooCommerce, PDF, custom post types & ACF, lead capture, analytics, usage control, prompt override, and more) for €49.99/year. [Get SmartSearchWP Premium »](https://www.smartsearchwp.com/product/license-premium/)

Whether you run an eCommerce store, corporate site, blog, or documentation platform, SmartSearchWP improves engagement, reduces support workload, and enhances content discovery.

= What makes SmartSearchWP different =

Most AI chatbot plugins simply forward your visitors to OpenAI. SmartSearchWP is built around three ideas:

* Grounded in YOUR content. Answers are retrieved from your own posts and pages using embeddings (RAG), so replies stay on topic and reflect what you actually published, not the open web.
* Self-hosted, your key. The plugin runs on your WordPress install and calls OpenAI with your own API key. Your content and your keys stay under your control, which helps with GDPR compliance.
* Modular, not bloated. A complete free core, extended by dedicated premium add-ons you install only if you need them.

No competing plugin combines all three at once: grounded answers from your own content, running on your own site, with your own key.

= What you get =

* Fewer repetitive support requests: visitors get instant, content-based answers.
* Better content discovery: semantic search surfaces the right page instead of keyword guesses.
* Answers you can stand behind: responses are drawn from your published content, not invented.
* Full ownership: your site, your OpenAI key, your data.

= Core Features (free) =

= AI Chatbot Integration =

Connect your website to OpenAI's ChatGPT models to provide dynamic, contextual answers based on your own content.

All available ChatGPT models are presented in the plugin settings depending on your API key and OpenAI account. Supported models include Chat models (gpt-4o, gpt-4o-mini, gpt-4.1, etc.), Reasoning models (gpt-5, o3, o4-mini, etc.), and legacy options, each with recommendations, estimated cost levels, and suitability guidance for chatbot use.

= Semantic Search Engine =

Improve content discovery with AI-driven semantic search instead of simple keyword matching.

= Contextual Content Indexing =

Index your posts and pages so the chatbot answers from your own content. (Indexing custom post types and ACF fields is available with the premium Custom Type Manager add-on.)

= Modular Architecture =

Extend functionality through dedicated addons without bloating your core installation.

No request or usage cap is reserved to a paid tier: the free core is complete, and you bring your own OpenAI key.

= Premium Add-ons =

A premium license unlocks the add-ons that extend what the assistant can read and do:

* WooCommerce Integration (premium addon): use your products, with SKU and price, as a content source.
* PDF (premium addon): add the content of your media-library PDFs to the answers.
* Custom Type Manager (premium addon): index custom post types and ACF fields (the free core indexes posts and pages).
* Prompt Override (premium addon): replace the system prompt to control tone and scope.
* Usage Control (premium addon): restrict access by role, page, device, schedule, or question budget.
* RAG Auto Sync (premium addon): automatically re-index new content (uses your OpenAI key).
* Lead Capture (premium addon): collect visitor emails in-chat with a GDPR form and CSV export.
* Analytics & Insights (premium addon): a KPI dashboard over your chat logs (top questions, charts, CSV, weekly email).
* RAG Debugger (premium addon): test questions and inspect the retrieved contexts.
* Customization (premium addon): adjust the chatbot appearance (colors, position).

Premium add-ons are available with a license at €49.99/year: [Get SmartSearchWP Premium »](https://www.smartsearchwp.com/product/license-premium/)

= Who it's for =

* Site owners, agencies, and developers who want answers grounded in their own content.
* Teams that prefer a self-hosted tool using their own OpenAI account rather than a SaaS black box.
* eCommerce, corporate, blog, and documentation sites that want to reduce support load and improve discovery.

= Who it's not for =

* Anyone who does not want to use their own OpenAI API key (the plugin needs one to answer).
* Sites looking for a fully managed, hosted chatbot with no setup: SmartSearchWP runs on your server.
* Live human-agent chat: SmartSearchWP answers from your content, it is not a live-chat helpdesk.

= Performance & Safety =

SmartSearchWP follows WordPress development standards and keeps a clean separation between core functionality and extensions.

* Lightweight architecture
* API-based processing via OpenAI
* No unnecessary front-end bloat
* Full administrative control
* Easy activation and deactivation

SmartSearchWP does not store unnecessary data and allows you to manage and limit API usage efficiently.

= Use Cases =

* eCommerce stores providing instant product assistance
* Corporate websites reducing support requests
* Blogs with large content libraries improving discoverability
* Technical documentation sites offering intelligent Q&A
* Agencies deploying scalable AI solutions for clients

The chatbot uses OpenAI as a third-party service to generate its answers. You can find more information about OpenAI [here](https://openai.com/) and consult their [privacy policy](https://openai.com/policies/terms-of-use).

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/smartsearchwp` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Enter your OpenAI API key in the SmartSearchWP settings panel.
4. Configure indexing and chatbot behavior.
5. In **SmartSearchWP > Summaries**, generate embeddings for at least one page or post, then click **Activate**. The chatbot will not appear on the front end until at least one context is active — without this step, the plugin may be enabled in settings but no content has been selected for the chatbot to use.
6. Display the chatbot using the provided interface or shortcode.

== Frequently Asked Questions ==

= Does SmartSearchWP slow down my site? =

No. Processing is handled through the OpenAI API. The plugin remains lightweight and modular.

= Can I control AI responses? =

Yes. You can customize prompts, restrict usage, define content sources, and manage behavior precisely.

= How are OpenAI API costs managed? =

You use your own OpenAI API key and can restrict usage by role, page, or quota limits to control costs.

= Is WooCommerce supported? =

Yes. With the WooCommerce integration addon, product data can be included in contextual AI responses.

= Can I disable the chatbot easily? =

Yes. The plugin can be deactivated at any time without affecting your website content.

= The chatbot shows "Forbidden" or a raw error page =

Some hosts (Wordfence, ModSecurity, OVH CDN Basic, etc.) block POST requests to `/wp-json/wdgpt/v1/retrieve-prompt`. Since version 2.7.4, SmartSearchWP retries automatically, falls back to `admin-ajax.php`, and shows a friendly message instead of raw error HTML. If issues persist, whitelist that REST route or exclude it from your CDN/WAF rules.

= WooCommerce: search by SKU or product reference =

With the WooCommerce Integration addon (1.4.0+) and SmartSearchWP 2.8.0+, the chatbot can match exact product references (SKU, `ref_xxx`) before semantic search and uses grounded numeric prices in the AI context to reduce wrong amounts (e.g. 83,46€ vs 8346€). Regenerate product embeddings after upgrading so SKU and price are indexed.

= How do I activate the bot? =

The bot will not appear on your website until you have activated it. To activate the bot, you need to generate and activate the embeddings for the pages and posts you want to use, as well as the general settings.

General settings:
1. Go to the SmartSearchWP settings page.
2. Enter your ChatGPT API key.
3. Modify the settings to your needs.
4. Save the settings.

= How do I customize the chatbot's context? =

Generate and activate pages:
1. Go to the SmartSearchWP 'Summaries' page.
2. Click on the 'Generate Embeddings' button under the page or post you want to use.
3. Once their embeddings have been generated, click on the 'Activate' button under the page or post you want to use.
4. Repeat steps 2 and 3 for all the pages and posts you want to use.

= How do I get help? =

Browse our FAQ at [https://www.smartsearchwp.com/faq/](https://www.smartsearchwp.com/faq/) for answers about setup, addons, licensing, and technical topics. If you cannot find what you need there, contact us at hello@smartsearchwp.com.

== Screenshots ==

Screenshots are saved inside the /assets/screenshots directory.

1. Main interface when interacting with the chatbot.
2. Several settings available to modify and enhance your experience.
3. WooCommerce product answer with exact SKU and grounded price (premium WooCommerce addon).
4. Summaries / contexts screen: generate and activate embeddings (RAG).
5. Addons manager: install and manage premium addons.

== Changelog ==

= 2.8.8 =
* Fix (important): resolves a fatal error some sites could hit on 2.8.7 (a required runtime file was missing from the package). Updating to 2.8.8 restores normal operation; your settings and data are kept.
* Addons manager: clearer, benefit-first descriptions of premium addons (including Analytics) and a short value intro at the top of the catalog.
* Expired Premium license message now states that installed addons keep working; renew for addon updates, new addons, and priority support.

= 2.8.7 =
* Fix: removed the extra generic "rate this plugin" notice on General Settings (it showed on every visit, unnamed). The named SmartSearchWP review notice from 2.8.6 is unchanged.
* The in-plugin review notice now uses the same capability as the plugin menu and is never shown on Error Logs.
* Housekeeping: removed an unused compiled JavaScript file that the plugin no longer loads.

= 2.8.6 =
* New: Optional admin notice asking for a WordPress.org review after real chatbot usage (conversations over several days) — never shown on a fresh install
* The notice is dismissible and snoozable, capped, and skipped when the chatbot has recent API errors or many unanswered questions
* Satisfied admins are pointed to the public review form; unhappy admins are pointed to support and the FAQ — the review link stays available (no incentives)

= 2.8.5 =
* Readme: clarified which capabilities are premium addons (Usage Control, Prompt Override, WooCommerce, PDF)
* Readme: refreshed screenshots and compatibility (tested up to WordPress 7.1)
* Developer: filter `wdgpt_can_send_prompt` before OpenAI generation (addons can deny a prompt with a service message)
* Developer: action `wdgpt_prompt_accepted` after a prompt is accepted (usage counters / quotas)

= 2.8.4 =
* New: Email alerts on Error Logs — configure recipients and alert types (quota, invalid API key, rate limit, server errors) with 6-hour anti-spam throttle
* New: Test alert email and last-sent banner on the Logs tab
* New: Optional setting to hide the front chatbot when OpenAI reports insufficient quota / billing (default off; auto-restore after TTL or successful API / key validation)
* Developer: action `wdgpt_error_logged` after chatbot errors are persisted

= 2.8.3 =
* Fix: Contexts admin page no longer appears blank when OpenAI returns temporary API errors (5xx, rate limits, connectivity issues)
* Fix: OpenAI API validation distinguishes invalid keys from transient server errors instead of treating every non-200 response as an invalid key
* Fix: Settings page shows the correct warning during OpenAI outages; validation results are cached briefly to avoid repeated live checks on each admin load
* Developer: read-only filter `wdgpt_rag_debug_retrieval_result` after retrieval selection (including empty contexts); Chat Logs row link to RAG Debugger addon when active

= 2.8.2 =
* New read-only `WDGPT_Logs_Repository` for aggregated chat log metrics (conversations, messages, daily series, top pages, top first questions, no-answer patterns)
* Action `wdgpt_conversation_logged` fired after each persisted conversation turn (for Analytics addon cache invalidation)

= 2.8.1 =
* Front-end hooks for premium addons: filter `wdgpt_chatbot_front_config` (extends `wdChatbotData`) and action `wdgpt_chatbot_ui_before_input` with UI slot `#wdgpt-addon-ui-slot` for in-chat addon UI (e.g. Lead Capture)
* Plugins page: contextual license notice under active SmartSearchWP addon rows (links to the matching addon in Addons manager or License settings)

= 2.8.0 =
* RAG grounding: detect product identifiers (SKU, ref_xxx) and allow addons to force matching products into context before semantic ranking
* Prompt guardrails against inventing prices or statistics not present in the provided context
* Filters `wdgpt_retrieval_product_identifiers`, `wdgpt_retrieval_force_contexts`, `wdgpt_answer_after_stream` for WooCommerce and extensions
* Debug retrieval logging when SmartSearchWP debug mode is enabled

= 2.7.5 =
* Fix: Contexts (embeddings) admin tooltip no longer claims automatic generation on save — manual Generate Embeddings + Activate remains the default workflow
* Contexts page notice pointing to the premium RAG Auto Sync addon for automated indexing (with API cost awareness)
* New `wdgpt_generate_embeddings_for_post()` helper and `wdgpt_before_generate_embeddings` filter for addon integration

= 2.7.4 =
* Fix: proper handling of network/WAF errors on chatbot retrieve-prompt requests (no more raw Forbidden/error page displayed in the chat bubble)
* Automatic retry with backoff, admin-ajax.php fallback when /wp-json/ is blocked, localized user message, and console diagnostic logging
* FAQ note for hosts that must whitelist `/wp-json/wdgpt/v1/retrieve-prompt`

= 2.7.3 =
* Fix truncated or garbled assistant text in admin chat logs and scheduled PDF/email reports when using Chat Completions streaming (e.g. gpt-4.1-mini): buffer incomplete SSE lines server-side before JSON decode — cURL can split `data:` events mid-line, which previously dropped delta chunks while the live chat still looked correct
* Log storage: assistant messages use `wp_kses_post()` (safe HTML such as `<br>` and links); user messages use `sanitize_textarea_field()` for longer questions and UTF-8 text

= 2.7.2 =
* Fix chatbot response truncated or overwritten during streaming (only end of message displayed)
* More robust SSE parsing: use proper JSON.parse instead of fragile string extraction for stream chunks
* Simplified streaming display: single content span to avoid overwrites and duplication when links appear
* Safety net: on stream completion [DONE], re-render full answer to ensure correct display even if streaming glitched
* Cleanup of chunk queue and writing state on completion to prevent memory leaks

= 2.7.1 =
* Add "Download discussion" link in chat logs page to export a single conversation as .txt file (questions and answers)
* Fix multi-encoded HTML entities in streamed chatbot responses (&amp;amp;... on special chars, paths, code blocks)
* Use raw text buffer during streaming instead of re-processing rendered HTML through markdown (prevents cascading encoding)
* Fix gpt-5-nano stuck without response: use text.verbosity for OpenAI Responses API (parameter moved from root level in 2025)

= 2.7.0 =
* Added support for all available ChatGPT models (Chat, Reasoning, Frontier) depending on API key and OpenAI account
* New model selection with optgroups: "Recommended for chatbot" and "Other models"
* Model characteristics: recommendations, warnings, estimated cost level (Low/Medium/High)
* Icons and visual indicators for each model's suitability
* Support for reasoning models (gpt-5, o3, o4-mini, o3-mini, gpt-5.4, gpt-5-mini, gpt-5-nano) via Responses API

= 2.6.4 =
* Updated plugin description and readme content for WordPress.org
* Fix multi-encoded HTML entities in chatbot responses (paths, code, special chars displayed as &amp;amp;...)
* Add decodeHtmlEntities to restore readable display of over-encoded content in streamed responses and localStorage messages

= 2.6.3 =
* 100% compatibility with WordPress 6.9.1
* Fix undefined property and variable in answer generator (OpenAI client, error handling)
* Fix cosine similarity when embedding vectors have non-sequential keys (prevents PHP notices)

= 2.6.2 =
* Added export all conversations feature in chat logs page
* Fixed undefined array key error in logs table

= 2.6.1 =
* Fix welcome and greeting messages display issue
* Improve JavaScript handling for chat bubble text retrieval

= 2.6.0 =
* Add "Purge Transients" button in general settings to clear addons cache
* Improve error handling in API calls with try-catch blocks
* Enhanced stability when OpenAI API calls fail

= 2.5.6 =
* Corrected formatting of the URL for the 'get a free licence' button in the actions menu

= 2.5.5 =
* Official support for the Usage Control addon: restrict chatbot access by user role, page, post type, and device (mobile/desktop).
* Improved extensibility for future addons.
* Various fixes and optimisations.

= 2.5.4 =
* Support for the Prompt Override addon: ability to customise the prompt sent to the AI.
* Improved addon integration.
* Various fixes and optimisations.

= 2.5.3 =
* Modification of OpenAI API key verification.

= 2.5.2 =
* Debugging functionality

= 2.5.1 =
* Added the option of displaying the licence key in plain text in the back office
* Added new logs for licence management
* Better licence cache management

= 2.5.0 =
* New debugging functionality added to the plugin
* Better management of licence renewal dates

= 2.4.12 =
* Added identification of private pages in the list of pages and posts
* Improving contexts that are too long, mainly for pdf files
* Improved compatibility for version php8.1

= 2.4.11 =
* Update translations for all existing languages
* Improved licence key management for back office performance
* Add plugin version to general settings

= 2.4.10 =
* Update translations for all existing languages
* Add German (de_DE) translations
* Add Spanish (es_ES) translations
* Add bulk action to generate embeddings, activate or deactivate pages and posts
* Fix bug with 0 & 1 replacement in answers (Thanks to Robert Grygier)

= 2.4.9 =
* Update translations for all existing languages
* Add Italian (it_IT) translation
* Fix translation display and warnings in POT files
* Fixed default clause in switch statements

= 2.4.8 =
* Change deprecated function FILTER_SANITIZE to FILTER_SANITIZE_FULL_SPECIAL_CHARS
* Add norwegian langage (thanks to Robert Grygier)

= 2.4.7 =
* Fix embeddings generation if context is too big
* Add compatibility for generating context with pdf file (add-on with pdf compatibility will be required, soon available)

= 2.4.6 =
* Resolved an issue which might expose openAI key.

= 2.4.5 =
* Resolved an issue to SQL & XSS injection in the chatbot interface and user restriction to purge logs.

= 2.4.4 =
* Resolved an issue where the answer stream was truncate.

= 2.4.3 =
* Resolved an issue where the answer couldn't be written in the interface due to empty chunks.

= 2.4.2 =
* Resolved a problem where the Text-to-Speech function was incorrectly processing HTML and Markdown tags in the speech.
* Introduced notifications within the admin panel to alert users about pending updates for addons.
* Corrected a glitch causing the chat interface to scroll to the top upon submitting a prompt.
* Addressed an issue encountered when viewing the chatbot on a WooCommerce product page.

= 2.4.1 =
* Resolved a visual inconsistency issue with the Text-to-Speech (TTS) button on specific websites.
* Introduced a feature that allows users to halt the Text-to-Speech function by clicking the button a second time after it has been activated.
* Implemented a prevention mechanism to avoid the accumulation of Text-to-Speech tasks in the queue, enhancing the overall user experience.

= 2.4.0 =
* The chat now includes built-in Text-to-Speech and speech recognition features! A new button, located to the left of the input field, has been introduced to capture and transcribe user's spoken input. Additionally, each message can be audibly read out using the Text-to-Speech option.

= 2.3.2 =
* Resolved an issue where existing CSS rules on a WordPress site could potentially override the visual style of the chatbot plugin.

= 2.3.1 =
* The small notification bubble above the chat icon has been reinstated! It's now compatible with the customization addon and will display correctly based on the position set within the addon.
* We've eliminated the random number that used to appear on top of the chatbot icon, as the notification bubble now serves the same function.
* The greeting message is now customizable! If you don't alter them in the settings, it will default to the standard translations. This feature has also been implemented for the chatbot bubble.

= 2.3.0 =
* Cleaned up contexts' embeddings generation.
* Prevent the user from regenerating embeddings when there is no need to.

= 2.2.1 =
* Fixed a pagination issue inside the contexts' interface, and only show contexts based on the current language if the user is using WPML.

= 2.2.0 =
* Upgraded to gpt4-o from gpt-4 for faster answer generation and reduced token cost. This change is automatically applied within your plugin.
* With gpt4-o, the generated answers can be up to three times longer compared to gpt4 and gpt-3.5-turbo.
* Resolved an intermittent issue where the addons' catalog was not properly receiving data from the website.
* Fixed a problem with the premium license verification. It should now renew itself correctly. This issue did not affect your license but was not properly automated.
* Added a clickable permalink next to the context's title in the contexts' interface for easy page access.
* Integrated WPML support in the contexts' interface to identify the page language, useful when dealing with pages of the same name in different languages.
* Resolved an issue where Markdown was not always correctly applied when generating answers. This fix is also applied to the logs.
* Introduced a filter in the context's interface to display only posts or pages with the selected status, such as active or having embeddings.
* Fixed an issue where the search box was not functioning correctly under certain conditions.
* Corrected an issue where translations were not properly applied in the addons manager during premium license verification.

= 2.1.0 =
* Rectified a situation wherein the image and title of an addon within the catalog were mistakenly perceived as buttons, rather than directing to the appropriate addon.
* Resolved an issue occurring when the user's API key lacked credit, resulting in improper verification of results.
* Presenting a fresh look! The chat interface now boasts an enhanced default appearance compared to its predecessor.
* Addressed an issue where the disclaimer occasionally extended beyond the confines of the chat frame, subsequently augmenting its size.
* Implemented spacing between the input field and the send button for improved user experience.
* Enhanced aesthetics and space efficiency by substituting the chat's name with its icon when generating responses.
* Optimized the ellipsis used as a loading indicator for improved functionality.

= 2.0.0 =
* Premium addons are now available! You can access them via the "Addons" submenu within the admin page. There's also a free license available for any potential free addons.
* We've resolved an issue where the chatbot container would occasionally hide behind other elements. The container will now consistently maintain its priority.
* Fixed an issue that could sometimes prevent the user from deactivating the plugin.
* Added a verification for the required 'allow_url_fopen' server setting.

= 1.9.0 =
* Added a new disclaimer below the chat interface to inform users that artificial intelligence can occasionally make mistakes. Users are advised to verify critical information.
* Improved answer generation for a more seamless reading experience for users.
* Fixed an issue that prevented links from being clickable while the chatbot was generating a response.
* Resolved an issue where certain segments of words could be omitted during answer generation, leading to potential problems in the output.
* Addressed an issue where certain characters were displayed as their HTML codes instead of their readable forms (e.g., € was displayed as &euro;).
* Corrected a problem where the general settings sliders did not update their values correctly upon page reload.
* Enhanced visual appeal! The answers now support markdown and parse them for users to enjoy a better experience, such as bold or italics. This is also in effect inside the chat logs and the reporting.

= 1.1.8.4 =
* Fixed an issue that could occur if the posts had a special encoding.

= 1.1.8.3 =
* Fixed an issue with the counting of tokens when using GPT-4.

= 1.1.8.2 =
* Added a verification for users that had updated to 1.1.8 before.

= 1.1.8.1 =
* Fixed an issue that prevented some users from correctly updating the database.

= 1.1.8 =
* Added a new validation inside the admin page to verify that the API key is valid.
* Added a new validation inside the admin page to verify if your current API key is able to use gpt-4.
* Added a reporting that the current API key has insufficient credits to be used.
* Added a new validation inside the admin page to let the user know if the OpenAI API is having issues.
* Added a toggle to enable/disable the chatbot on the front-end.
* Fixed an issue with translations not being loaded correctly in the administration page.
* Added a new color inside the administration interface for contexts that have been activated, but their embeddings are not "up to date" with the content of the page.
* Added a legend on top of the contexts table to explain the different colors.
* Added a new chat bubble next to the interface to better show the chatbot to the users. This bubble can be hidden directly, or 5 seconds after the page has been loaded.
* Added an option to hide the chat bubble completely.
* Added a new feature to receive, by mails, a PDF that will contain the conversations made by users in the last day or week. This report will run through a cron every day.

= 1.1.7.1 =
* Fixed an issue with error reporting.

= 1.1.7 =
* Fixed an issue with error reporting on some PHP versions.
* Fixed an issue with the answer generation with bad formatting of posts.

= 1.1.6 =
* Fixed an issue with bigger contexts using the wrong model.

= 1.1.5 =
* Added missing vendor files.

= 1.1.4 =
* Added a new feature to have the chatbot answer "word by word" instead of waiting for the full answer to be generated.
* The new feature will also make the chatbot answer faster, especially on long answers.
* The chatbot will no longer automatically scroll to the bottom when a new answer is generated. This allows the user to start reading the answer while it is being generated.
* Further fixed the clickable links in the chatbot interface to prevent them from not being interpreted correctly.
* Fixed an issue with the chatbot logs delete function on some PHP versions.
* Fixed an issue with the chatbot interface in some resolutions.
* Fixed an issue when holding a conversation with the chatbot for a long time.
* Fixed an issue with the chatbot interface when the user is typing a message while the chatbot is generating an answer.
* Fixed an issue when trying to find the most relevant page to answer a question on certain posts.
* Fixed an issue when using the previous messages in the conversation when trying to generate an answer.

= 1.1.3 =
* Fixed an issue with previous versions of PHP.
* Updated minimum PHP version to 7.4.

= 1.1.2 =
* Fix an issue with some model versions for retrieving the chatbot's answer.

= 1.1.1 =
* Fix issue with some PHP versions.

= 1.1.0 =
* Answer time should now be faster.
* Optimized the chatbot interface for better performance.
* Improved the answer generation algorithm for better quality, especially with longer answers.
* Added a new "reset conversation" button to the chatbot interface.
* Introduced an "Expand/Compress" button to adjust the width of the chatbot interface.
* Added colour to better differentiate activated and deactivated pages in the summaries page.
* Fixed display issues with certain links and line breaks in the chatbot interface.
* Fixed display issues with certain links and line breaks inside the chatbot logs admin page.

= 1.0.3 =
* Fix issue on the chatbot interface on certain sites.

= 1.0.2 =
* Add link to the SmartSearchWP website in the description of the plugin.

= 1.0.1 =
* Add chatgpt Model selection in settings (chatgtp3.5-turbo or chatgpt-4)
* Some CSS fixe

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 2.7.3 =
Fixes truncated or corrupted text in admin chat logs and PDF/email reports when streaming with Chat Completions (server-side SSE line buffering). Improved sanitization for stored messages.

= 2.7.2 =
Fixes chatbot responses truncated or overwritten during streaming. More robust parsing and a safety net ensure correct display.

= 2.7.1 =
Fixes multi-encoded HTML entities in streamed chatbot responses (special characters, paths, code blocks displayed correctly).

= 2.7.0 =
Support for all available ChatGPT models based on your API key and account. New model recommendations, cost indicators, and suitability guidance for chatbot use.

= 2.6.4 =
Updated plugin description and readme content for WordPress.org (conversion & SEO). Fix multi-encoded HTML entities in chatbot responses for readable display.

= 2.4.3 =
Resolves a response display problem that can occur when autocompleting certain responses.
