nvquyet2224 AI Chatbot for WooCommerce

Description

nvquyet2224 AI Chatbot adds a chat widget to your site. When a visitor asks a question, the plugin finds the most relevant parts of your own content (posts, pages and WooCommerce products) and asks an AI model to answer using only that information, with links back to the source.

It uses a technique called RAG (retrieval-augmented generation). Vector embeddings of your content are stored in your own WordPress database. No separate vector service or subscription is needed.

Features

  • Chat widget with live, typed-out answers (streaming)
  • Answers from your posts, pages and WooCommerce products. The whole index is searched, however large the site is
  • Password-protected content, unpublished content and WooCommerce products hidden from the catalog are never indexed
  • Product cards with name, price and link for WooCommerce products
  • Automatic background sync: new and edited content is indexed in the background through WP-Cron
  • Works with Google Gemini. You use your own API key
  • The API key is stored encrypted in your database
  • Answers in the visitor’s own language
  • Customisable bot name, welcome message, colour and position, with a one-click “Reset to Default”
  • Suggested questions: optional quick-reply buttons shown above the input
  • Built-in protection against abuse: per-visitor rate limit and a daily message cap
  • Translation ready: strings are internationalised and can be translated on translate.wordpress.org
  • Optional “Powered by nvquyet2224 AI Chatbot” credit, off by default
  • Your data stays on your site when you uninstall, unless you choose to delete it

You need an API key

The plugin does not include AI credits. Create a key with Google AI Studio (Gemini) and paste it into the plugin settings. Usage is billed by Google according to their pricing.

External services

This plugin connects to the Google Gemini AI service. Nothing is sent until you enter an API key.

Google Gemini API (Google LLC)

Used to generate embeddings and chat responses. Requests go to https://generativelanguage.googleapis.com.

  • When an administrator opens the settings screen or clicks “Load models from Google”: a request with the API key is sent to list the available models. No site content is sent.
  • When content is synced: the text of the posts, pages and products you have chosen to index (title, content, and for products price and short details) is sent to create embeddings.
  • When a visitor chats: the visitor’s message, up to the last 10 messages of that conversation, and the most relevant excerpts of your content are sent to generate an answer.
  • Terms of service: https://ai.google.dev/gemini-api/terms
  • Privacy policy: https://policies.google.com/privacy

Do not index content you do not want sent to Google. Visitors should be informed that their chat messages are processed by a third-party AI service. A suggested text is added to your site’s privacy policy page (Settings > Privacy).

Privacy

  • The plugin does not set tracking cookies.
  • The chat history shown in the widget is kept in the visitor’s own browser (local storage). It is not stored on your server.
  • Chat requests are rate limited per IP address. For this check only a one-way hash of the IP address is kept, in a temporary value that expires after 60 seconds. The plain IP address is not stored.
  • A site-wide counter of chat messages per day is kept (a number only, no personal data) to cap API costs.

Screenshots

Installation

  1. Upload the plugin folder to /wp-content/plugins/, or install it from the Plugins screen.
  2. Activate the plugin.
  3. Go to nvquyet2224 AI Chatbot > AI Settings and paste your Google Gemini API key. Use Test API Connection to check it.
  4. Go to RAG Sync and click the sync button to index your content. After that, new and edited content is indexed automatically.
  5. Visit your site. The chat widget appears in the corner. You can change its look under Widget Appearance.

FAQ

Do I need to pay for anything?

The plugin is free. Google charges for API usage under their own pricing. Google offers a free tier for Gemini models.

Where do I get an API key?

Get a free or paid API key at Google AI Studio: https://aistudio.google.com/

Is my API key safe?

It is stored encrypted in the WordPress options table and is never shown in full in the admin. Keep your site and its wp-config.php salts secure.

Does it work with WooCommerce?

Yes. Products are indexed with their name, description, price and link, and the bot can show product cards. WooCommerce is optional.

Is private or password-protected content indexed?

No. Only published content without a password is indexed, and WooCommerce products set to “hidden” are skipped. Posts that are unpublished, deleted or whose type you deselect are removed from the index on the next save or sync.

I changed the embedding model. What now?

Stored vectors from a different embedding model are not compatible, so a notice asks you to run RAG Sync again. Until then answers may be off-topic.

Can I change the message limits?

The defaults are 30 messages per minute per visitor and 3,000 per day for the whole site. Developers can change them with the nvquyet2224_daily_message_cap filter (0 disables the daily cap). Behind a proxy or CDN, return the visitor’s real IP with the nvquyet2224_client_ip filter.

What content is sent to the AI provider?

See the “External services” section above. Only content of the post types you select under the sync settings is sent.

Will the chat work with page caching?

Yes. The widget requests a short-lived security token from the REST API when the visitor first sends a message, so a cached page does not break the chat.

What happens to my data if I uninstall the plugin?

By default the stored vectors and settings are kept. If you turn on “Delete all data on uninstall” in the settings, they are removed when the plugin is deleted.

Visitors are blocked with “too many messages” behind Cloudflare or a proxy.

Chat requests are limited to 30 per minute per visitor IP. If your site sits behind a proxy or CDN, every visitor can look like the same IP. Return the real visitor IP with the nvquyet2224_client_ip filter. You can also change the site-wide daily cap (default 3000 messages) with the nvquyet2224_daily_message_cap filter.

The chat widget does not appear.

The widget is shown only when it is enabled under Widget Appearance and a Gemini API key has been saved.

The bot says it has connection problems.

Check that your API key is valid and has quota with your provider, then use Test API Connection. The free tier of the Gemini API has a small daily request limit for each model: when it is used up Google rejects further requests until the next day, so use a key with billing enabled on a busy site.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“nvquyet2224 AI Chatbot for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • First public release.