You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f8dcf03
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ Verify a change by building the zip and loading the classes from the extracted t
129
129
|`includes/blocks/`| 8 free Gutenberg blocks (React in `src/`, compiled to `build/`) |
130
130
|`includes/pro/`| Premium features: custom permalinks, rating system, help widget, KB homepage mode, floating TOC, docs layout, term featured images, export/import (Markdown/SQL/XLSX), GitHub import |
131
131
|`includes/pro/blocks/`| 3 pro Gutenberg blocks: rating, toc, section-tree (React in `src/`, compiled to `build/`) |
132
-
|`includes/pro/ai/`| Ask the docs (WordPress 7.0+ AI Client only): settings tab, retriever, prompt service, `POST /wzkb/v1/ask`, usage limits, answer cache, search box and Help widget front end, question log and Content gaps report, `knowledgebase/ask` ability. User docs in the free repo's `docs/` (`ask-the-docs.md`, `ask-the-docs-developer-reference.md`) |
132
+
|`includes/pro/ai/`| Ask the Docs (WordPress 7.0+ AI Client only): settings tab, retriever, prompt service, `POST /wzkb/v1/ask`, usage limits, answer cache, search box and Help widget front end, question log and Content gaps report, `knowledgebase/ask` ability. User docs in the free repo's `docs/` (`ask-the-docs.md`, `ask-the-docs-developer-reference.md`) |
133
133
|`includes/pro/github/`| GitHub Markdown import: API wrapper, content converter, import processor, webhook handler, import wizard, link rewriter |
134
134
|`includes/pro/widgets/`| 2 pro classic widgets: TOC, Section Tree |
135
135
|`includes/rest/`| REST API under `/wzkb/v1/` namespace |
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ Verify a change by building the zip and loading the classes from the extracted t
129
129
|`includes/blocks/`| 8 free Gutenberg blocks (React in `src/`, compiled to `build/`) |
130
130
|`includes/pro/`| Premium features: custom permalinks, rating system, help widget, KB homepage mode, floating TOC, docs layout, term featured images, export/import (Markdown/SQL/XLSX), GitHub import |
131
131
|`includes/pro/blocks/`| 3 pro Gutenberg blocks: rating, toc, section-tree (React in `src/`, compiled to `build/`) |
132
-
|`includes/pro/ai/`| Ask the docs (WordPress 7.0+ AI Client only): settings tab, retriever, prompt service, `POST /wzkb/v1/ask`, usage limits, answer cache, search box and Help widget front end, question log and Content gaps report, `knowledgebase/ask` ability. User docs in the free repo's `docs/` (`ask-the-docs.md`, `ask-the-docs-developer-reference.md`) |
132
+
|`includes/pro/ai/`| Ask the Docs (WordPress 7.0+ AI Client only): settings tab, retriever, prompt service, `POST /wzkb/v1/ask`, usage limits, answer cache, search box and Help widget front end, question log and Content gaps report, `knowledgebase/ask` ability. User docs in the free repo's `docs/` (`ask-the-docs.md`, `ask-the-docs-developer-reference.md`) |
133
133
|`includes/pro/github/`| GitHub Markdown import: API wrapper, content converter, import processor, webhook handler, import wizard, link rewriter |
134
134
|`includes/pro/widgets/`| 2 pro classic widgets: TOC, Section Tree |
135
135
|`includes/rest/`| REST API under `/wzkb/v1/` namespace |
Copy file name to clipboardExpand all lines: docs/01-kb-getting-started/ask-the-docs.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
slug: ask-the-docs
3
-
title: "Ask the docs: AI answers from your knowledge base"
3
+
title: "Ask the Docs: AI answers from your knowledge base"
4
4
products: [knowledgebase]
5
5
sections: ["01-kb-getting-started"]
6
6
tags: [ai, knowledgebase, pro, search]
@@ -11,31 +11,31 @@ toc: true
11
11
12
12
[toc]
13
13
14
-
**Ask the docs** in [Knowledge Base Pro](https://webberzone.com/plugins/knowledgebase/) answers a visitor's plain-language question from your published articles, with links to the articles it used. When your articles don't cover the question, it says so, points to the search results and, optionally, logs the question so you can see where your documentation falls short. Ask the docs is in beta.
14
+
**Ask the Docs** in [Knowledge Base Pro](https://webberzone.com/plugins/knowledgebase/) answers a visitor's plain-language question from your published articles, with links to the articles it used. When your articles don't cover the question, it says so, points to the search results and, optionally, logs the question so you can see where your documentation falls short. Ask the Docs is in beta.
15
15
16
16
## Requirements
17
17
18
18
- Knowledge Base Pro 3.2.0 or later.
19
-
- WordPress 7.0 or later. Ask the docs uses the AI Client built into WordPress 7.0. On older versions the feature does not load and the rest of the plugin works as before.
19
+
- WordPress 7.0 or later. Ask the Docs uses the AI Client built into WordPress 7.0. On older versions the feature does not load and the rest of the plugin works as before.
20
20
- An AI provider connected under **Settings → Connectors**, such as the official Anthropic, OpenAI or Google provider plugins. It must support text generation with structured JSON output.
21
21
22
22
Knowledge Base Pro never sees or stores API keys. WordPress sends each request through the provider you have connected, which bills you per request.
23
23
24
-
## Set up Ask the docs
24
+
## Set up Ask the Docs
25
25
26
26
1. Connect a provider under **Settings → Connectors**.
27
-
2. Go to **Knowledge Base → Settings → AI (Beta)** and turn on **Enable Ask the docs**. If the tab says no AI provider is configured, the provider isn't set up yet or doesn't support structured answers.
27
+
2. Go to **Knowledge Base → Settings → AI (Beta)** and turn on **Enable Ask the Docs**. If the tab says no AI provider is configured, the provider isn't set up yet or doesn't support structured answers.
28
28
3. Set the **Daily request cap** and **Questions per visitor per hour** to fit your provider budget.
29
29
30
-
Ask the docs then answers in every knowledge base search box (the Knowledge Base Search block, the `[[kbsearch]]` shortcode and the knowledge base templates) and in the [Help widget](https://webberzone.com/support/knowledgebase/knowledge-base-help-widget/). Live search suggestions still appear while typing; pressing Enter or the search button asks the question. Without JavaScript, or when no provider is available, the search box submits to the knowledge base search results as usual.
30
+
Ask the Docs then answers in every knowledge base search box (the Knowledge Base Search block, the `[[kbsearch]]` shortcode and the knowledge base templates) and in the [Help widget](https://webberzone.com/support/knowledgebase/knowledge-base-help-widget/). Live search suggestions still appear while typing; pressing Enter or the search button asks the question. Without JavaScript, or when no provider is available, the search box submits to the knowledge base search results as usual.
31
31
32
32
## Settings
33
33
34
34
All settings are under **Knowledge Base → Settings → AI (Beta)**.
35
35
36
36
| Setting | Default | What it does |
37
37
| --- | --- | --- |
38
-
|**Enable Ask the docs**| Off | Turns the feature on. |
38
+
|**Enable Ask the Docs**| Off | Turns the feature on. |
39
39
|**AI provider**| Automatic | The connected provider that answers. Automatic lets WordPress choose, and is used if the chosen provider's plugin is deactivated. |
40
40
|**Articles sent as context**|`4`| Matching articles sent with each question, from 1 to 8. More articles improve coverage but cost more. |
41
41
|**Maximum characters per article**|`3000`| Each article is trimmed to this length before it is sent, from 500 to 10,000. |
@@ -76,7 +76,7 @@ If no articles match, no request is sent.
76
76
77
77
**Each visitor gets a fixed number of questions per hour.** Once a visitor reaches it, their questions go to the search results with no error shown.
78
78
79
-
**The daily cap switches Ask the docs off** until the next day in your site's time zone. Search boxes then work as plain search forms.
79
+
**The daily cap switches Ask the Docs off** until the next day in your site's time zone. Search boxes then work as plain search forms.
80
80
81
81
**Requests must come from your site and a browser.** Requests from other sites, bots and scripts are refused before any provider request. See [Bot check](https://webberzone.com/support/knowledgebase/ask-the-docs-developer-reference/) in the developer reference. A determined script can fake both, so the daily cap remains the limit on cost.
82
82
@@ -105,6 +105,6 @@ Each row links to a new article with the question as its title, and to the knowl
105
105
106
106
## See also
107
107
108
-
-[Ask the docs developer reference](https://webberzone.com/support/knowledgebase/ask-the-docs-developer-reference/)
108
+
-[Ask the Docs developer reference](https://webberzone.com/support/knowledgebase/ask-the-docs-developer-reference/)
109
109
-[Knowledge Base Pro Help Widget](https://webberzone.com/support/knowledgebase/knowledge-base-help-widget/)
Copy file name to clipboardExpand all lines: docs/01-kb-getting-started/free-vs-pro-knowledge-base.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ status: publish
8
8
order: 0
9
9
---
10
10
11
-
Knowledge Base is free to use. The Pro upgrade adds AI answers from your articles (Ask the docs), article ratings and feedback, a floating help widget, a three-column documentation layout, a custom permalinks engine, premium layouts, and GitHub-based content sync for larger documentation sites.
11
+
Knowledge Base is free to use. The Pro upgrade adds AI answers from your articles (Ask the Docs), article ratings and feedback, a floating help widget, a three-column documentation layout, a custom permalinks engine, premium layouts, and GitHub-based content sync for larger documentation sites.
12
12
13
13
## Free vs Pro
14
14
@@ -47,7 +47,7 @@ Knowledge Base is free to use. The Pro upgrade adds AI answers from your article
47
47
| Floating help widget with live search and suggested articles | ❌ | ✅ |
48
48
| Help widget contact form with email notifications | ❌ | ✅ |
49
49
|**AI (Beta, WordPress 7.0+)**|||
50
-
| Ask the docs: AI answers from your articles in search boxes and the Help widget | ❌ | ✅ |
50
+
| Ask the Docs: AI answers from your articles in search boxes and the Help widget | ❌ | ✅ |
51
51
| Source and related article links with each answer | ❌ | ✅ |
52
52
| Answer caching, per-visitor limits and a daily request cap | ❌ | ✅ |
53
53
| Content gaps report of unanswered questions, with CSV export | ❌ | ✅ |
Copy file name to clipboardExpand all lines: docs/01-kb-getting-started/knowledge-base-help-widget.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ toc: true
11
11
12
12
[toc]
13
13
14
-
The **Help Widget** in [Knowledge Base Pro](https://webberzone.com/plugins/knowledgebase/) is a floating button that opens a help panel on your site. Visitors can search your knowledge base, browse suggested articles, get an AI answer with [Ask the docs](https://webberzone.com/support/knowledgebase/ask-the-docs/), or send you a message, without leaving the page.
14
+
The **Help Widget** in [Knowledge Base Pro](https://webberzone.com/plugins/knowledgebase/) is a floating button that opens a help panel on your site. Visitors can search your knowledge base, browse suggested articles, get an AI answer with [Ask the Docs](https://webberzone.com/support/knowledgebase/ask-the-docs/), or send you a message, without leaving the page.
15
15
16
16
## Set up the Help Widget
17
17
@@ -34,9 +34,9 @@ Go to **Knowledge Base → Settings → Pro** and turn on **Enable Help Widget**
34
34
35
35
The panel follows the visitor's light or dark mode preference, works with the keyboard and screen readers, and supports right-to-left languages.
36
36
37
-
## Ask the docs in the Help Widget
37
+
## Ask the Docs in the Help Widget
38
38
39
-
With Ask the docs enabled and **Use in the Help widget** turned on under **Knowledge Base → Settings → AI (Beta)**:
39
+
With Ask the Docs enabled and **Use in the Help widget** turned on under **Knowledge Base → Settings → AI (Beta)**:
40
40
41
41
- Typing still shows matching articles.
42
42
- Pressing Enter or the search button also shows a short answer above the articles, with its sources and related articles.
Copy file name to clipboardExpand all lines: docs/01-kb-getting-started/knowledge-base-settings.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ How long should the knowledge base be cached for? Default is 1 day.
96
96
97
97
#### Clearing the cache
98
98
99
-
To clear the cache, go to **Knowledge Base → Tools** and click **Clear Cache**, or click **Clear cache** next to **Save Changes** on the settings page (Pro only). Both clear the knowledge base output cache and cached REST API responses. In Pro, they also clear cached [Ask the docs](https://webberzone.com/support/knowledgebase/ask-the-docs/) answers.
99
+
To clear the cache, go to **Knowledge Base → Tools** and click **Clear Cache**, or click **Clear cache** next to **Save Changes** on the settings page (Pro only). Both clear the knowledge base output cache and cached REST API responses. In Pro, they also clear cached [Ask the Docs](https://webberzone.com/support/knowledgebase/ask-the-docs/) answers.
100
100
101
101
### Uninstall options
102
102
@@ -444,11 +444,11 @@ Enable a subtle pulsing animation on the help widget button to draw attention. D
444
444
445
445
## AI (Beta) *(Pro only)*
446
446
447
-
Settings for [Ask the docs](https://webberzone.com/support/knowledgebase/ask-the-docs/), which answers visitors' questions from your knowledge base using the AI provider connected under **Settings → Connectors**. This tab appears on WordPress 7.0 or later.
447
+
Settings for [Ask the Docs](https://webberzone.com/support/knowledgebase/ask-the-docs/), which answers visitors' questions from your knowledge base using the AI provider connected under **Settings → Connectors**. This tab appears on WordPress 7.0 or later.
448
448
449
449
| Setting | Default | Description |
450
450
| --- | --- | --- |
451
-
|**Enable Ask the docs**| Off | Turns the feature on. |
451
+
|**Enable Ask the Docs**| Off | Turns the feature on. |
452
452
|**AI provider**| Automatic | Which connected provider answers questions. |
453
453
|**Articles sent as context**| 4 | Matching articles sent with each question (1–8). |
454
454
|**Maximum characters per article**| 3,000 | Each article is trimmed to this length before it is sent (500–10,000). |
@@ -462,4 +462,4 @@ Settings for [Ask the docs](https://webberzone.com/support/knowledgebase/ask-the
462
462
|**Record questions for Content gaps**| Off | Store question text for the Content gaps report. |
463
463
|**Log retention (days)**| 90 | How long recorded questions are kept (1–3,650). |
464
464
465
-
See [Ask the docs](https://webberzone.com/support/knowledgebase/ask-the-docs/#settings) for details on each setting.
465
+
See [Ask the Docs](https://webberzone.com/support/knowledgebase/ask-the-docs/#settings) for details on each setting.
Copy file name to clipboardExpand all lines: docs/01-kb-getting-started/live-search.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ As soon as the visitor types in the KB search box, an AJAX request fetches match
27
27
-**Accessible** — results are announced to screen readers via an ARIA live region.
28
28
-**Debounced** — requests fire after a short pause while typing, not on every keystroke.
29
29
30
-
With [Ask the docs](https://webberzone.com/support/knowledgebase/ask-the-docs/)*(Pro)* turned on, suggestions still appear while typing. Pressing Enter with no suggestion highlighted asks the question instead of opening the search results.
30
+
With [Ask the Docs](https://webberzone.com/support/knowledgebase/ask-the-docs/)*(Pro)* turned on, suggestions still appear while typing. Pressing Enter with no suggestion highlighted asks the question instead of opening the search results.
31
31
32
32
## Better Search
33
33
@@ -56,6 +56,6 @@ If suggestions use the wrong language, check your translation plugin’s configu
56
56
57
57
## See also
58
58
59
-
-[Ask the docs](https://webberzone.com/support/knowledgebase/ask-the-docs/) — AI answers in the search box *(Pro)*
59
+
-[Ask the Docs](https://webberzone.com/support/knowledgebase/ask-the-docs/) — AI answers in the search box *(Pro)*
60
60
-[Knowledge Base Settings](https://webberzone.com/support/knowledgebase/knowledge-base-settings/) — Output settings reference
61
61
-[Knowledge Base Shortcodes](https://webberzone.com/support/knowledgebase/knowledge-base-shortcodes/) — `[[kbsearch]]` shortcode
This reference covers the REST endpoint, the Abilities API ability, and the filters and actions behind **Ask the docs** in [Knowledge Base Pro](https://webberzone.com/plugins/knowledgebase/). For setup and settings, see [Ask the docs: AI answers from your knowledge base](https://webberzone.com/support/knowledgebase/ask-the-docs/).
14
+
This reference covers the REST endpoint, the Abilities API ability, and the filters and actions behind **Ask the Docs** in [Knowledge Base Pro](https://webberzone.com/plugins/knowledgebase/). For setup and settings, see [Ask the Docs: AI answers from your knowledge base](https://webberzone.com/support/knowledgebase/ask-the-docs/).
15
15
16
-
Ask the docs needs WordPress 7.0 or later. On older versions none of these hooks, routes or abilities are registered.
16
+
Ask the Docs needs WordPress 7.0 or later. On older versions none of these hooks, routes or abilities are registered.
17
17
18
18
## REST endpoint
19
19
@@ -47,7 +47,7 @@ Questions must be 3 to 300 characters after HTML tags are stripped and whitespac
47
47
| 400 |`wzkb_ai_invalid_question`| The question is too short or too long. |
48
48
| 403 |`wzkb_ai_forbidden_origin`| The `Origin` (or `Referer`) header doesn't match the site or an allowed origin. |
49
49
| 403 |`wzkb_ai_forbidden_client`| The request has no user agent, or one that looks like a bot, script or HTTP library. |
50
-
| 404 |`wzkb_ai_unavailable`| Ask the docs is disabled or no provider is available. |
50
+
| 404 |`wzkb_ai_unavailable`| Ask the Docs is disabled or no provider is available. |
51
51
| 429 |`wzkb_ai_rate_limited`| The visitor reached **Questions per visitor per hour**. The `Retry-After` header gives the seconds until the next hour. |
52
52
53
53
When the daily cap is reached, the endpoint returns 200 with `answered` set to `false` and `reason` set to `daily_cap`.
@@ -78,7 +78,7 @@ add_filter(
78
78
79
79
## Ability
80
80
81
-
Knowledge Base Pro registers the `knowledgebase/ask` ability with the WordPress Abilities API, in the shared `webberzone` category. It takes `{ "question": "..." }`, returns the same data as the REST endpoint, and runs through the same cache and limits. It is registered only on WordPress 7.0 or later, where Ask the docs loads.
81
+
Knowledge Base Pro registers the `knowledgebase/ask` ability with the WordPress Abilities API, in the shared `webberzone` category. It takes `{ "question": "..." }`, returns the same data as the REST endpoint, and runs through the same cache and limits. It is registered only on WordPress 7.0 or later, where Ask the Docs loads.
82
82
83
83
It is limited to logged-in users by default, because the Abilities API route cannot check that a request comes from your site the way the REST endpoint does. The bot check does not apply to it. Use `wzkb_ai_ability_permission` to change who can run it:
84
84
@@ -140,7 +140,7 @@ add_filter(
140
140
| Action | Arguments | Description |
141
141
| --- | --- | --- |
142
142
|`wzkb_ai_question_asked`|`string $question`, `array $result`, `bool $cached`| Fires after each answered or unanswered question. |
143
-
|`wzkb_cache_cleared`| None | Fires after **Knowledge Base → Tools → Clear Cache** clears the output cache. Knowledge Base uses it to invalidate REST API responses, and Knowledge Base Pro to delete cached Ask the docs answers. |
143
+
|`wzkb_cache_cleared`| None | Fires after **Knowledge Base → Tools → Clear Cache** clears the output cache. Knowledge Base uses it to invalidate REST API responses, and Knowledge Base Pro to delete cached Ask the Docs answers. |
144
144
145
145
```php
146
146
add_action(
@@ -159,6 +159,6 @@ add_action(
159
159
160
160
## See also
161
161
162
-
-[Ask the docs: AI answers from your knowledge base](https://webberzone.com/support/knowledgebase/ask-the-docs/)
162
+
-[Ask the Docs: AI answers from your knowledge base](https://webberzone.com/support/knowledgebase/ask-the-docs/)
163
163
-[Knowledge Base Abilities API](https://webberzone.com/support/knowledgebase/knowledge-base-abilities-api/)
164
164
-[Knowledge Base REST API](https://webberzone.com/support/knowledgebase/knowledge-base-rest-api/)
0 commit comments