{"id":317200,"date":"2026-07-18T12:42:48","date_gmt":"2026-07-18T12:42:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/sohay-ai-chatbot-for-knowledge-base-support\/"},"modified":"2026-07-31T20:18:30","modified_gmt":"2026-07-31T20:18:30","slug":"sohaychat","status":"publish","type":"plugin","link":"https:\/\/mya.wordpress.org\/plugins\/sohaychat\/","author":14068367,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.0.2","requires":"6.6","requires_php":"8.1","requires_plugins":null,"header_name":"Sohay \u2014 AI Chatbot for Knowledge Base and WooCommerce","header_author":"Bengal Studio","header_description":"AI chatbot with a Knowledge Base for customer support. Streaming answers, plus a Conversations admin and team assignment.","assets_banners_color":"f5f5f5","last_updated":"2026-07-31 20:18:30","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/sohaychat.com\/","header_author_uri":"https:\/\/bengal-studio.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":102,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"bhoot","date":"2026-07-18 12:42:29"},"1.1.0":{"tag":"1.1.0","author":"bhoot","date":"2026-07-31 20:18:30"}},"upgrade_notice":{"1.1.0":"<p>Adds WooCommerce shopping tools \u2014 catalog search, product and variant lookup, cart add\/update\/remove, and store-policy answers \u2014 on stores running WooCommerce 7.0 or newer; the tools stay hidden on other sites. A one-time database update runs automatically on upgrade.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3630463,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3630463,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3630463,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3630463,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3630463,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3630463,"resolution":"1","location":"assets","locale":"","width":2400,"height":1640},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3630463,"resolution":"2","location":"assets","locale":"","width":2400,"height":1640},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3630463,"resolution":"3","location":"assets","locale":"","width":2400,"height":1640},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3630463,"resolution":"4","location":"assets","locale":"","width":2400,"height":1640},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3630463,"resolution":"5","location":"assets","locale":"","width":2880,"height":1880},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3630463,"resolution":"6","location":"assets","locale":"","width":2880,"height":1880},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3630463,"resolution":"7","location":"assets","locale":"","width":2880,"height":2150},"screenshot-8.png":{"filename":"screenshot-8.png","revision":3630463,"resolution":"8","location":"assets","locale":"","width":2880,"height":2360}},"screenshots":{"1":"The chat launcher sitting in the bottom-right of the site, respecting iOS safe-area-inset above the home indicator.","2":"The expanded chat panel mid-conversation, streaming an answer grounded in a Knowledge Base article.","3":"Shopping in the chat \u2014 a product search returning live catalog results, each card carrying the store's own price, stock, and \"Add to cart\".","4":"Adding to the cart from the chat, with the running cart, totals, an Undo button, and a link straight to checkout.","5":"<strong>Sohay \u2192 Conversations<\/strong> \u2014 the admin SPA listing recent conversations with filter, search, and assignee controls.","6":"A single conversation opened in the admin, showing message history and the reply composer.","7":"<strong>Sohay \u2192 AI Settings \u2192 Spend protection<\/strong> \u2014 daily per-visitor and site-wide token caps with the live usage readout.","8":"<strong>Sohay \u2192 Dashboard<\/strong> \u2014 conversation volume and trends, recent activity, recently published Knowledge Base articles, and quick actions."}},"plugin_section":[],"plugin_tags":[2353,2364,2369,14090,286],"plugin_category":[47],"plugin_contributors":[154526],"plugin_business_model":[],"class_list":["post-317200","plugin","type-plugin","status-publish","hentry","plugin_tags-ai","plugin_tags-chatbot","plugin_tags-customer-support","plugin_tags-knowledge-base","plugin_tags-woocommerce","plugin_category-education-and-support","plugin_contributors-bhoot","plugin_committers-bhoot"],"banners":{"banner":"https:\/\/ps.w.org\/sohaychat\/assets\/banner-772x250.png?rev=3630463","banner_2x":"https:\/\/ps.w.org\/sohaychat\/assets\/banner-1544x500.png?rev=3630463","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/sohaychat\/assets\/icon.svg?rev=3630463","icon":"https:\/\/ps.w.org\/sohaychat\/assets\/icon.svg?rev=3630463","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-1.png?rev=3630463","caption":"The chat launcher sitting in the bottom-right of the site, respecting iOS safe-area-inset above the home indicator."},{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-2.png?rev=3630463","caption":"The expanded chat panel mid-conversation, streaming an answer grounded in a Knowledge Base article."},{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-3.png?rev=3630463","caption":"Shopping in the chat \u2014 a product search returning live catalog results, each card carrying the store's own price, stock, and \"Add to cart\"."},{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-4.png?rev=3630463","caption":"Adding to the cart from the chat, with the running cart, totals, an Undo button, and a link straight to checkout."},{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-5.png?rev=3630463","caption":"<strong>Sohay \u2192 Conversations<\/strong> \u2014 the admin SPA listing recent conversations with filter, search, and assignee controls."},{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-6.png?rev=3630463","caption":"A single conversation opened in the admin, showing message history and the reply composer."},{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-7.png?rev=3630463","caption":"<strong>Sohay \u2192 AI Settings \u2192 Spend protection<\/strong> \u2014 daily per-visitor and site-wide token caps with the live usage readout."},{"src":"https:\/\/ps.w.org\/sohaychat\/assets\/screenshot-8.png?rev=3630463","caption":"<strong>Sohay \u2192 Dashboard<\/strong> \u2014 conversation volume and trends, recent activity, recently published Knowledge Base articles, and quick actions."}],"raw_content":"<!--section=description-->\n<p>Sohay adds an AI chat widget to your WordPress site that answers visitor questions from the articles you publish. You write articles in the built-in Knowledge Base, and the chatbot looks up the best matches before it replies \u2014 so it stays on-topic and uses your real content instead of guessing.<\/p>\n\n<p><strong>On a WooCommerce store, the chatbot shops with your visitors.<\/strong> It searches your catalog, pulls up a product with its size and colour options, reads live stock and prices, answers shipping, returns, and refund questions from your store's own pages, and adds, changes, or removes items in the shopper's cart \u2014 without them leaving the conversation. Every cart change comes with an Undo button, and every price and stock status is read from your store rather than invented. On sites without WooCommerce, none of it appears.<\/p>\n\n<p>Every conversation is saved in a built-in inbox under <strong>Sohay \u2192 Conversations<\/strong> \u2014 your team can read, search, filter, assign, and reply from one place.<\/p>\n\n<h4>Why site owners pick Sohay<\/h4>\n\n<ul>\n<li><strong>Answers from your own content<\/strong> \u2014 the chatbot reads the articles you publish in your Knowledge Base. It doesn't make up product details or invent prices.<\/li>\n<li><strong>Sells, not just supports<\/strong> \u2014 on a WooCommerce store the chatbot searches your catalog, checks stock and prices, and fills the shopper's cart inside the conversation. Declares HPOS and Cart-Checkout-Blocks compatibility. On sites without WooCommerce the shopping tools stay hidden and everything else works the same.<\/li>\n<li><strong>No coding to set up<\/strong> \u2014 paste an OpenAI API key, publish a few articles, click \"Sync All Articles\". The widget appears on every page.<\/li>\n<li><strong>A real inbox for your team<\/strong> \u2014 every conversation is saved. Search, filter by status, assign one to a teammate, or reply yourself.<\/li>\n<li><strong>Predictable costs<\/strong> \u2014 set a daily OpenAI token cap and the plugin stops calling OpenAI for the rest of the day once you hit it. A runaway loop or a hostile bot can't drain your account overnight.<\/li>\n<li><strong>GDPR-friendly out of the box<\/strong> \u2014 conversations are stored on your own site, in your own database. Signed-in visitors' chats flow through WordPress's built-in <strong>Export \/ Erase Personal Data<\/strong> tools; anonymous guest chats (which have no email to match on) are erased by deleting them from the <strong>Conversations<\/strong> inbox. See <strong>Privacy<\/strong> below.<\/li>\n<\/ul>\n\n<h4>What's included<\/h4>\n\n<ul>\n<li>A <strong>chat widget<\/strong> that drops into every page (you can hide it on pages you don't want it on).<\/li>\n<li><strong>WooCommerce shopping tools<\/strong> (WooCommerce 7.0 or later) \u2014 catalog search and browse, product and variant lookup, live stock and prices, shipping\/returns\/refund answers, and add, change, or remove in the shopper's cart. Each result renders as a card in the chat rather than a wall of text.<\/li>\n<li>A <strong>Knowledge Base<\/strong> section in the WordPress admin, with a \"Sync All Articles\" button.<\/li>\n<li>A <strong>Conversations admin<\/strong> where you can read, search, filter, assign, reply, pin, and close chats.<\/li>\n<li>An <strong>AI Settings<\/strong> screen for picking the OpenAI model, writing the welcome message, and setting daily spend caps.<\/li>\n<li>A <strong>Diagnostics<\/strong> screen that shows today's OpenAI token usage and the most recent plugin log entries.<\/li>\n<li><strong>Fast page loads<\/strong> \u2014 the chat code only downloads when a visitor actually opens the chat, not on every page view.<\/li>\n<li><strong>Your OpenAI key is encrypted<\/strong> in the database and never shown in the admin UI after you save it.<\/li>\n<\/ul>\n\n<h4>You'll need<\/h4>\n\n<ul>\n<li>A WordPress site running version 6.6 or later, on PHP 8.1 or later.<\/li>\n<li>An OpenAI account and API key. You pay OpenAI directly for the model usage \u2014 Sohay does not resell access. A typical small support site stays in single-digit dollars per month.<\/li>\n<li>Optional \u2014 WooCommerce 7.0 or later, if you want the shopping tools. Everything else works without it.<\/li>\n<\/ul>\n\n<h4>External services<\/h4>\n\n<p>Sohay sends data to OpenAI (https:\/\/openai.com) to generate chat answers and index your Knowledge Base. Without an OpenAI account and API key, the plugin has no upstream model to call and the chat widget cannot answer questions.<\/p>\n\n<p><strong>What is sent, and when<\/strong><\/p>\n\n<ul>\n<li><strong>When a visitor sends a chat message<\/strong> \u2014 the message text and recent conversation history are forwarded over HTTPS to <code>https:\/\/api.openai.com\/v1\/responses<\/code> (or the equivalent streaming endpoint for the model you selected) and processed by the OpenAI model configured under <strong>Sohay \u2192 AI Settings<\/strong>.<\/li>\n<li><strong>When you publish or update a Knowledge Base article<\/strong> \u2014 the title and body are sent in the background to OpenAI Files and Vector Stores (<code>https:\/\/api.openai.com\/v1\/files<\/code>, <code>\/v1\/vector_stores<\/code>, <code>\/v1\/vector_stores\/*\/files<\/code>) so the chat can retrieve them. The sync runs in the background, not while you click Save.<\/li>\n<li><strong>When you open AI Settings<\/strong> \u2014 the plugin makes a one-off call to <code>https:\/\/api.openai.com\/v1\/models<\/code> to populate the model-picker dropdown.<\/li>\n<li><strong>On a WooCommerce store, when the chatbot uses a shopping tool<\/strong> \u2014 the answer it looks up is sent back to the model so it can reply, in the same conversation as the message that prompted it. Depending on the tool, that is: product names, descriptions, prices, sale prices, stock status, categories, tags, option names and values (size, colour), product page and image URLs; the text of the store pages you have set as Terms, Privacy, Refunds and Returns, plus any Knowledge Base articles matched to a shipping, returns or refund question; and the contents of the shopper's cart \u2014 the items in it, their quantities and options, and the cart totals. This happens only on stores running WooCommerce, and only for the tools the chatbot actually calls in that conversation.<\/li>\n<\/ul>\n\n<p><strong>What is <em>not<\/em> sent.<\/strong> The cart data describes the basket, not the shopper: no name, email address, postal address, phone number, or payment details are included. Sohay never sends order history, customer records, or anything from WooCommerce's checkout to OpenAI, because none of the shopping tools read them.<\/p>\n\n<p><strong>Where it goes<\/strong><\/p>\n\n<p>All requests go to <code>api.openai.com<\/code> over HTTPS. The plugin does not contact any other external service \u2014 no analytics, no telemetry, no third-party fonts or CDN assets, and no phone-home for updates. Updates come from WordPress.org.<\/p>\n\n<p><strong>How your API key is handled<\/strong><\/p>\n\n<p>The OpenAI API key you enter under <strong>AI Settings<\/strong> authenticates every request. It is encrypted at rest (AES-256-GCM) in your WordPress database, masked in the admin UI after the first save, and excluded from the WordPress REST API. The plugin never sends the key anywhere other than <code>api.openai.com<\/code>.<\/p>\n\n<p><strong>Your responsibilities<\/strong><\/p>\n\n<p>Before activating the plugin, please review OpenAI's <a href=\"https:\/\/openai.com\/policies\/terms-of-use\">Terms of Use<\/a> and <a href=\"https:\/\/openai.com\/policies\/privacy-policy\">Privacy Policy<\/a>. Site owners are responsible for obtaining the appropriate legal basis (consent, contract, legitimate interest, etc.) to share visitor messages with OpenAI under GDPR, CCPA, and other applicable privacy regimes in the jurisdictions they operate in. On a WooCommerce store that basis needs to cover the shopping tools too \u2014 what a visitor has put in their cart is information about that visitor, even though no name or address is attached to it. If you would rather it never left your site, the shopping tools can be switched off individually in code; see the FAQ below.<\/p>\n\n<h4>Privacy<\/h4>\n\n<p>Conversations and messages are stored in custom database tables on your own site.<\/p>\n\n<p>For <strong>signed-in visitors<\/strong>, the plugin registers WordPress's personal-data exporter and eraser, so the standard <strong>Tools \u2192 Export Personal Data<\/strong> and <strong>Tools \u2192 Erase Personal Data<\/strong> flows include their Sohay conversations, matched on their account email.<\/p>\n\n<p><strong>Anonymous (logged-out) visitors' chats<\/strong> aren't tied to an email address, so those email-based tools can't locate them. To erase a specific guest conversation, open it under <strong>Sohay \u2192 Conversations<\/strong> and delete it (available to users with the AI-settings capability); it leaves the inbox immediately and is permanently purged after the retention window \u2014 30 days by default, filterable in code. A visitor can also delete their own chat from the widget, and every soft-delete follows the same purge path.<\/p>\n\n<p><strong>On a WooCommerce store<\/strong>, the chatbot's shopping tools read your catalog, your policy pages, and the visitor's own cart. What they find is sent to OpenAI so the model can answer, and it is also saved with the conversation \u2014 that is what lets the product card or cart summary still be there when the visitor scrolls back. So a stored conversation on a WooCommerce store can contain a snapshot of what that visitor had in their cart at the time. It is covered by the same export, erase and retention paths as the rest of the conversation: erasing the chat erases the snapshot with it. No customer name, address, or payment detail is involved \u2014 see <strong>External services<\/strong> for the exact list.<\/p>\n\n<p>See the <strong>External services<\/strong> section above for what gets sent to OpenAI.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>From the <strong>Plugins \u2192 Add New<\/strong> screen, search for <strong>Sohay<\/strong> and click <strong>Install Now<\/strong>, then <strong>Activate<\/strong>. A new <strong>Sohay<\/strong> menu appears in your WordPress admin sidebar.<\/li>\n<li>Visit <strong>Sohay \u2192 AI Settings<\/strong> and paste your OpenAI API key into the first field. (If you don't have one yet, you can create one at platform.openai.com.) Click <strong>Save<\/strong>. The key is stored encrypted \u2014 the field shows a masked placeholder from now on.<\/li>\n<li>While still on <strong>AI Settings<\/strong>, pick the OpenAI model you want to use, set a daily token cap under <strong>Spend protection<\/strong>, and (optionally) write a welcome message that greets visitors when they open the chat.<\/li>\n<li>Add at least one article under <strong>KB Articles \u2192 Add New<\/strong>. This is the content the chatbot draws from. You can write as many as you like; longer-form support articles work best.<\/li>\n<li>Visit <strong>Sohay \u2192 KB Settings \u2192 Dashboard<\/strong> and click <strong>Sync All Articles<\/strong>. The sync runs in the background \u2014 articles become searchable to the chatbot within a minute or two.<\/li>\n<li>Visit your site's front-end. The chat launcher appears in the bottom-right corner. Click it to open the chat and try a question your Knowledge Base can answer.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20need%20an%20openai%20account%3F\"><h3>Do I need an OpenAI account?<\/h3><\/dt>\n<dd><p>Yes. Sohay is a front-end for OpenAI's models \u2014 without an OpenAI API key the plugin has no model to call and the chat cannot answer questions. OpenAI bills you directly per token; Sohay does not resell access. The <strong>Spend protection<\/strong> controls under <strong>AI Settings<\/strong> let you cap daily token usage to keep costs predictable.<\/p><\/dd>\n<dt id=\"how%20much%20will%20openai%20cost%20me%3F\"><h3>How much will OpenAI cost me?<\/h3><\/dt>\n<dd><p>OpenAI charges per token, and the per-token rate depends on the model you pick (the cheaper models cost a fraction of a cent per chat reply). A small support site typically stays in single-digit dollars per month. The <strong>Spend protection<\/strong> controls under <strong>AI Settings<\/strong> let you cap daily token usage \u2014 once the cap is hit, the plugin stops calling OpenAI for the rest of the day. The <strong>Diagnostics<\/strong> page shows today's usage so you can spot a runaway loop or a hostile bot before it costs you real money.<\/p><\/dd>\n<dt id=\"will%20the%20chatbot%20make%20things%20up%3F\"><h3>Will the chatbot make things up?<\/h3><\/dt>\n<dd><p>The chatbot is <em>grounded<\/em> in the articles you publish \u2014 if it can't find a matching article, it tells the visitor it doesn't know instead of inventing an answer. To improve answer quality, publish articles covering the questions you actually get asked, and write a fallback \"Contact us\" article so the chatbot can route off-topic questions to your human support team.<\/p><\/dd>\n<dt id=\"where%20can%20i%20see%20what%20visitors%20are%20asking%3F\"><h3>Where can I see what visitors are asking?<\/h3><\/dt>\n<dd><p><strong>Sohay \u2192 Conversations<\/strong> lists every chat \u2014 search them, filter by status, assign a chat to a teammate, or reply yourself. The <strong>Diagnostics<\/strong> page shows OpenAI errors if you're investigating a technical problem.<\/p><\/dd>\n<dt id=\"will%20my%20visitors%27%20chats%20be%20visible%20to%20other%20admins%3F\"><h3>Will my visitors' chats be visible to other admins?<\/h3><\/dt>\n<dd><p>By default, every WordPress administrator can read every conversation. The plugin ships with five granular capabilities so you can delegate access \u2014 for example, give a support agent the ability to read and reply to chats without granting them access to AI Settings. See the developer questions below for an overview, and the capability documentation in the plugin's GitHub repository for the full matrix with worked role-configuration examples.<\/p><\/dd>\n<dt id=\"does%20this%20slow%20down%20my%20site%3F\"><h3>Does this slow down my site?<\/h3><\/dt>\n<dd><p>A tiny launcher (~8 KB) loads on every page. The full chat code only downloads when a visitor actually clicks to open the chat, so most visitors never download it. No third-party scripts, fonts, or trackers are loaded from external CDNs.<\/p><\/dd>\n<dt id=\"what%20can%20shoppers%20do%20in%20the%20chat%20on%20a%20woocommerce%20store%3F\"><h3>What can shoppers do in the chat on a WooCommerce store?<\/h3><\/dt>\n<dd><p>On stores running WooCommerce 7.0 or later, a shopper can:<\/p>\n\n<ul>\n<li><strong>Search and browse your catalog<\/strong> \u2014 \"show me waterproof jackets under $100\", \"what's new?\", \"what's on sale?\" \u2014 results come back as product cards with photo, price, and stock.<\/li>\n<li><strong>Look at one product in detail<\/strong>, including its options, so they can pick a size or colour without leaving the chat.<\/li>\n<li><strong>See live stock and prices<\/strong>, read from your store at the moment they ask.<\/li>\n<li><strong>Ask about shipping, returns, refunds, and payment<\/strong> \u2014 answered from your WooCommerce store pages first, then from Knowledge Base articles you've tagged \"policy\" or \"faq\".<\/li>\n<li><strong>Manage their cart<\/strong> \u2014 add an item, change a quantity, or remove a line, each with an Undo button.<\/li>\n<\/ul>\n\n<p>The chatbot cannot take payment or place an order. When the shopper is ready it hands them to your normal WooCommerce checkout.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20work%20without%20woocommerce%3F\"><h3>Does the plugin work without WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. The chat widget, Knowledge Base, and Conversations inbox work on any WordPress site \u2014 the shopping tools simply never appear. On stores running WooCommerce 7.0 or later they switch on by themselves, with no configuration. The plugin also declares HPOS and Cart-Checkout-Blocks compatibility so stores don't see an \"uncertified plugin\" banner.<\/p><\/dd>\n<dt id=\"can%20i%20hide%20the%20widget%20on%20specific%20pages%3F\"><h3>Can I hide the widget on specific pages?<\/h3><\/dt>\n<dd><p>Uncheck <strong>Show widget<\/strong> under <strong>Sohay \u2192 AI Settings<\/strong> to hide it everywhere. To hide it only on certain pages or post types, see the developer questions below.<\/p><\/dd>\n<dt id=\"can%20i%20customize%20the%20welcome%20message%20and%20system%20prompt%3F\"><h3>Can I customize the welcome message and system prompt?<\/h3><\/dt>\n<dd><p>Yes. <strong>Sohay \u2192 AI Settings<\/strong> has a Welcome Message field (max 280 characters). <strong>Sohay \u2192 KB Settings \u2192 Settings<\/strong> has a Custom System Prompt field (max 4000 characters) for the instructions the chatbot follows when it generates answers. The Custom System Prompt field recognises <code>{site_name}<\/code> and <code>{current_date}<\/code> placeholders \u2014 they are replaced with your site's title and today's date before the prompt is sent to the model.<\/p><\/dd>\n<dt id=\"where%20is%20my%20openai%20api%20key%20stored%3F\"><h3>Where is my OpenAI API key stored?<\/h3><\/dt>\n<dd><p>Encrypted with AES-256-GCM in your WordPress database. The admin UI shows a masked placeholder once you've saved the key, and the value is excluded from the WordPress REST API. The plugin never sends the key anywhere other than <code>api.openai.com<\/code>.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20my%20data%20if%20i%20uninstall%20sohay%3F\"><h3>What happens to my data if I uninstall Sohay?<\/h3><\/dt>\n<dd><p>Uninstalling deletes the plugin's own database tables (conversations, messages, sync jobs, diagnostic logs), its settings, and the capabilities it added. <strong>Your Knowledge Base articles are kept<\/strong> \u2014 they're regular WordPress content, so removing the plugin doesn't delete them, and they're still there if you reinstall. If you want them gone too, delete the articles under <strong>KB Articles<\/strong> before you uninstall.<\/p><\/dd>\n<dt id=\"does%20sohay%20work%20on%20wordpress%20multisite%3F\"><h3>Does Sohay work on WordPress Multisite?<\/h3><\/dt>\n<dd><p>Yes. Each site in the network keeps its own conversations, Knowledge Base, and settings \u2014 nothing is shared across the network. Network-activate to enable Sohay everywhere (each site sets itself up on first load) or activate it per-site. Uninstalling from the network removes Sohay's data from every site.<\/p><\/dd>\n<dt id=\"for%20developers\"><h3>For developers<\/h3><\/dt>\n<dd><p>The questions below cover code-level customization. Sohay exposes 43 filters and 12 actions in total; the most-used ones appear here, and the full catalog lives in <code>docs\/HOOKS.md<\/code> in the plugin's GitHub repository, alongside <code>docs\/CAPABILITIES.md<\/code> for the full capability matrix.<\/p><\/dd>\n<dt id=\"how%20do%20i%20customize%20the%20plugin%20with%20code%3F\"><h3>How do I customize the plugin with code?<\/h3><\/dt>\n<dd><p>The most commonly customized filters:<\/p>\n\n<ul>\n<li><code>sohaychat_should_render_widget<\/code> (bool) \u2014 per-request gate on the chat widget. Combine with <code>is_singular()<\/code> \/ <code>is_product()<\/code> to scope the widget to specific pages.<\/li>\n<li><code>sohaychat_allowed_openai_models<\/code> (string[]) \u2014 allowlist of OpenAI model slugs the proxy may call. Restrict to cheaper models to cap spend.<\/li>\n<li><code>sohaychat_help_url<\/code> and <code>sohaychat_upgrade_url<\/code> (string) \u2014 override the admin-header \"Help\" and \"Upgrade\" links for resellers.<\/li>\n<li><code>sohaychat_admin_conversation_scope<\/code> \u2014 restrict which conversations a non-admin operator can see.<\/li>\n<li><code>sohaychat_tools<\/code> \u2014 the resolved tool list for the request. Remove an entry and the chatbot is never told that tool exists, so it can neither call it nor send its data to OpenAI.<\/li>\n<\/ul>\n\n<p>Example \u2014 keep the WooCommerce catalog answers but never let the cart leave the site:<\/p>\n\n<pre><code>add_filter( 'sohaychat_tools', function ( $tools ) {\n    unset( $tools['sohaychat-wc\/get-cart'], $tools['sohaychat-wc\/update-cart'] );\n    return $tools;\n} );\n<\/code><\/pre>\n\n<p>The keys are the tool names: <code>sohaychat-wc\/search-catalog<\/code>, <code>sohaychat-wc\/lookup-catalog<\/code>, <code>sohaychat-wc\/get-product<\/code>, <code>sohaychat-wc\/search-shop-policies-and-faqs<\/code>, <code>sohaychat-wc\/get-cart<\/code>, <code>sohaychat-wc\/update-cart<\/code>, and <code>sohaychat-kb\/get-information<\/code> for the Knowledge Base lookup. Returning an empty array disables tool use entirely \u2014 the chatbot still replies, just with no way to look anything up.<\/p>\n\n<p>Example \u2014 hide the widget everywhere except the WooCommerce shop and product pages:<\/p>\n\n<pre><code>add_filter( 'sohaychat_should_render_widget', function ( $enabled ) {\n    if ( ! $enabled ) { return false; }\n    return function_exists( 'is_shop' ) &amp;&amp; ( is_shop() || is_product() );\n} );\n<\/code><\/pre>\n\n<p>The constants on <code>Bengal_Studio\\Sohaychat\\Sohaychat_Hooks<\/code> are the recommended form for new code; the legacy literal form continues to work across releases.<\/p><\/dd>\n<dt id=\"how%20do%20i%20delegate%20access%20to%20non-admin%20roles%3F\"><h3>How do I delegate access to non-admin roles?<\/h3><\/dt>\n<dd><p>Five granular capabilities let you delegate parts of the plugin to non-admin roles:<\/p>\n\n<ul>\n<li><code>sohaychat_manage<\/code> \u2014 AI Settings page, OpenAI key reveal, model selection. Implicitly grants all four other plugin caps.<\/li>\n<li><code>sohaychat_view_conversations<\/code> \u2014 Sohay menu, Dashboard + Conversations submenus (read-only). Non-admin users with this cap are scoped to \"assigned to me or unassigned\" conversations.<\/li>\n<li><code>sohaychat_reply_conversations<\/code> \u2014 everything <code>sohaychat_view_conversations<\/code> grants, plus operator reply, assignee changes, pin \/ unpin, close \/ reopen. Implicitly grants <code>sohaychat_view_conversations<\/code>.<\/li>\n<li><code>sohaychat_manage_kb<\/code> \u2014 KB Settings admin page and KB sync routes.<\/li>\n<li><code>sohaychat_view_logs<\/code> \u2014 Diagnostics admin page (read-only). Clearing the log buffer is escalated to <code>sohaychat_manage<\/code> for forensics integrity.<\/li>\n<\/ul>\n\n<p>WordPress's built-in <code>manage_options<\/code> capability implicitly grants all five, so administrators keep working unchanged. Use Members, User Role Editor, or WP-CLI (<code>wp cap add &lt;role&gt; sohaychat_view_conversations<\/code>) to delegate caps to non-admin roles. See <code>docs\/CAPABILITIES.md<\/code> in the GitHub repository for the full matrix, every REST route's required cap, three worked role-configuration examples, and the conversation-scope filter contract.<\/p><\/dd>\n<dt id=\"how%20do%20i%20adjust%20rate%20limits%20or%20the%20daily%20openai%20token%20budget%20in%20code%3F\"><h3>How do I adjust rate limits or the daily OpenAI token budget in code?<\/h3><\/dt>\n<dd><p>Three independent limiter filters. The chat-message rate limit (<code>limit<\/code> requests per rolling <code>window<\/code> seconds, per visitor):<\/p>\n\n<pre><code>add_filter( 'sohaychat_rate_limit_options', function ( $opts ) {\n    $opts['limit']  = 60;\n    $opts['window'] = 60;\n    return $opts;\n} );\n<\/code><\/pre>\n\n<p>Behind Cloudflare or another reverse proxy, enable proxy-aware client-IP detection so per-visitor limits key off the real visitor rather than the proxy:<\/p>\n\n<pre><code>add_filter( 'sohaychat_rate_limit_options', function ( $opts ) {\n    $opts['proxy_support'] = true;\n    return $opts;\n} );\n<\/code><\/pre>\n\n<p>Enable <code>proxy_support<\/code> <strong>only<\/strong> when your site is reachable exclusively through the trusted proxy, and that proxy overwrites the <code>CF-Connecting-IP<\/code> \/ <code>X-Real-IP<\/code> \/ <code>X-Forwarded-For<\/code> headers on every request. On an origin that's also reachable directly, a visitor could forge those headers to sidestep per-visitor limits; the site-wide daily token budget still caps total spend.<\/p>\n\n<p>The public <code>\/auth\/guest-token<\/code> mint rate limit (separate so token-mint amplification protection can be tuned independently):<\/p>\n\n<pre><code>add_filter( 'sohaychat_auth_rate_limit_options', function ( $opts ) {\n    $opts['limit']  = 5;\n    $opts['window'] = 60;\n    return $opts;\n} );\n<\/code><\/pre>\n\n<p>The daily OpenAI token budget (caps also configurable under <strong>AI Settings \u2192 Spend protection<\/strong>; ceilings reset at UTC midnight; setting either value to 0 disables that particular ceiling):<\/p>\n\n<pre><code>add_filter( 'sohaychat_usage_tracker_options', function ( $opts ) {\n    $opts['site_cap']  = 5000000;\n    $opts['actor_cap'] = 25000;\n    return $opts;\n} );\n<\/code><\/pre>\n\n<p>The live readout on the Diagnostics page shows today's usage so you can spot a runaway loop before it 429s real visitors.<\/p><\/dd>\n<dt id=\"can%20i%20disable%20the%20kb%20search%20cache%3F\"><h3>Can I disable the KB search cache?<\/h3><\/dt>\n<dd><p>KB vector-search results are memoized in the <code>sohaychat_kb<\/code> object-cache group for 5 minutes by default. To shorten the window, lengthen it, or disable the cache entirely, use the <code>sohaychat_kb_search_cache_ttl<\/code> filter (return 0 to disable):<\/p>\n\n<pre><code>add_filter( 'sohaychat_kb_search_cache_ttl', '__return_zero' );\n<\/code><\/pre>\n\n<p>KB sync events flush the cache automatically, so content updates don't get masked.<\/p><\/dd>\n<dt id=\"why%20does%20the%20streaming%20response%20cut%20off%20behind%20my%20cdn%3F\"><h3>Why does the streaming response cut off behind my CDN?<\/h3><\/dt>\n<dd><p>The plugin sets <code>Cache-Control: no-cache<\/code>, <code>X-Accel-Buffering: no<\/code>, and clears output buffers, but some CDNs still buffer Server-Sent Events. If your CDN supports it, mark the chat REST route as bypassing the cache and disable transformations on the response.<\/p><\/dd>\n<dt id=\"where%20can%20i%20see%20streaming%2Fproxy%20errors%3F\"><h3>Where can I see streaming\/proxy errors?<\/h3><\/dt>\n<dd><p><strong>Sohay \u2192 Diagnostics<\/strong> shows the last 100 plugin log entries with timestamps and context. Each entry also fires the <code>sohaychat_log_error<\/code> action for integration with Sentry, Stackdriver, Query Monitor, etc.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New \u2014 WooCommerce shopping tools. On stores running WooCommerce 7.0 or newer, the chatbot can help shoppers right inside the chat: search and browse your catalog, look up a specific product and its options, check live stock and prices, answer shipping, returns, refund, and payment questions from your store settings and Knowledge Base, and add, change, or remove items in the shopper's cart. Cart changes come with an Undo button, and every price, stock count, and product detail comes straight from your store \u2014 the chatbot never makes them up. On sites without WooCommerce the tools stay completely hidden.<\/li>\n<li>Tag Knowledge Base articles as \"policy\" or \"faq\" (under KB Articles) so the store-policy answers prefer them for shipping, returns, and refund questions.<\/li>\n<li>Faster, cheaper repeat lookups \u2014 read-only catalog and policy results are briefly cached on sites running a persistent object cache (Redis or Memcached), scoped per shopper so nothing leaks between visitors. Tunable via the new <code>sohaychat_tool_cache_ttl<\/code> filter.<\/li>\n<li>Improved default chatbot instructions \u2014 the built-in prompt now greets visitors, declines off-topic questions politely, cites Knowledge Base articles as links, and answers in the visitor's language. Custom prompts now recognise <code>{site_name}<\/code> and <code>{current_date}<\/code>; your own custom system prompt still takes priority.<\/li>\n<li>Fixed \u2014 the chat widget no longer briefly showed a false \"Chat is temporarily unavailable\" message right after a successful answer.<\/li>\n<li>Fixed \u2014 the Conversations inbox now lists chats by most recent activity with correct timestamps regardless of your site's timezone, and loading older chats no longer repeats rows.<\/li>\n<li>For developers \u2014 a new <code>sohaychat_system_prompt<\/code> filter, a tools\/abilities foundation with new action and filter hooks, and a conversation tool-call audit table. This release also runs a one-time, automatic database update on upgrade.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release on WordPress.org.<\/li>\n<\/ul>","raw_excerpt":"An AI chatbot that answers questions from your articles, helps WooCommerce shoppers find products and fill their cart, and logs every chat.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/317200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=317200"}],"author":[{"embeddable":true,"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/bhoot"}],"wp:attachment":[{"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=317200"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=317200"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=317200"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=317200"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=317200"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mya.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=317200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}