hqweb AI chat

Description

hqweb AI chat adds a chat to your website. The bot answers visitors from your pages and your own questions and answers. When it does not know the answer, it says so and offers to pass the question to a manager instead of making something up.

You choose where the AI runs. Connect a cloud service such as OpenAI, Anthropic or Google Gemini with your own API key, or point the plugin at your own Ollama server. Details are in the External services section. No account with us is needed and we receive none of your data.

Key features

  • Chat widget that works on any theme and on phones
  • Any OpenAI-compatible server: enter a URL, a key and a model name
  • Knowledge base from pages, posts and custom post types, updated when content changes
  • WooCommerce products with live prices and stock, read from the store for every answer
  • Text from uploaded TXT, MD, DOCX and XLSX documents
  • Your own questions and answers, shown instantly without calling the model on an exact match
  • Search by meaning with an embedding model, or by keywords if you do not use one
  • Test screen that shows the answer and the fragments it was based on
  • Contact form with consent, requests arrive by email
  • Dialogue logs with automatic cleanup
  • Limits that protect your API budget
  • Works without a language model too: the bot then shows the best matching fragment

External services

The plugin has no service of its own and does not contact any server until the site owner sets up a connection. The owner chooses one AI service on the Connection tab and enters an API key for it, or the address of a private server. The plugin talks only to that one service. The chat stays off until the owner enables it.

What is sent and when

  • Each time a visitor sends a message that needs the model: the message, up to six earlier messages of the same dialogue, and the knowledge base fragments found for it.
  • If a search model is selected, each visitor message is also sent to it to find fragments.
  • When the knowledge base is indexed with a search model: the text of the selected pages, posts and products, your questions and answers, and the text of uploaded documents.
  • When the owner opens the Connection tab or tests the connection: a request for the list of models and a short test message.

The API key is sent with every request. Names, contacts and other details are sent only if a visitor types them into the chat message. Details left in the contact form stay on your site.

Services available in the plugin

With Ollama, LM Studio or another private server, data goes only to the address you enter, and the terms of whoever runs that server apply.

Source code

The admin app is built from the code in the src folder, which is included in the plugin. To build it, run npm install and npm run build in the plugin folder. The build uses Vite and is described in package.json and vite.config.js. The result is the build folder.

Installation

  1. Install and activate the plugin.
  2. Open hqweb AI chat in the admin menu.
  3. On the Connection tab, choose a provider, fill in the fields and press Save and test.
  4. On the Knowledge base tab, choose what the bot reads and press Rebuild the index.
  5. Try the bot on the same tab. Then turn on the chat on the Appearance tab.

FAQ

Do I need a paid API?

No. You can run a free open model on your own server with Ollama. It needs a server powerful enough for the model you choose: on a cheap VPS without a graphics card, answers can take a long time. A cloud API is usually the easiest start.

Which documents can I upload?

TXT, MD, DOCX and XLSX. The plugin extracts the text for the knowledge base and keeps the original file encrypted in a folder inside uploads, so that only an administrator can download it. Without the PHP openssl extension the original is not kept. Text in a hidden Excel sheet is skipped. The older DOC and XLS formats are not read: save such a file as DOCX or XLSX first.

How does the bot use documents and questions with answers?

Pages, products and documents are reference material: the bot finds the relevant part and answers in its own words. A question and answer is a ready reply: on a close match the bot shows it word for word.

Can the bot make mistakes?

Yes. The plugin instructs the model to answer only from your knowledge base, but AI models can still make errors. Review answers in the logs and on the test screen. By default, the chat tells visitors that answers come from AI.

How do I connect Ollama on a VPS?

The Ollama address must be reachable from the server that hosts your site. Put Ollama behind HTTPS with a password, and never leave port 11434 open to the internet.

Does the plugin work with page caching?

Yes. The chat does not depend on the cached page.

What does the plugin need on the server?

PHP 7.4 or later with the mbstring extension, which almost every host has. Reading DOCX and XLSX also needs the zip and dom extensions.

Where are dialogues stored?

On your site and in the visitor’s browser. Messages older than the number of days set on the Behavior tab are deleted: on the site by a daily task, in the browser the next time the chat opens.

What happens to my data when I delete the plugin?

Deleting the plugin removes its settings, API key, knowledge base, uploaded documents, dialogues and requests. Deactivating it keeps everything.

My site is behind a CDN and visitors hit the message limit

All visitors then look like one address. Return the real visitor address with the hqweb_ai_chat_client_ip filter.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“hqweb AI chat” is open source software. The following people have contributed to this plugin.

Contributors

“hqweb AI chat” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “hqweb AI chat” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.1

  • First version.