DocsQA UI

<qa-bot></qa-bot>

Install

Install <qa-bot> via npm or CDN, see details.

Configuration

Name

By default the name is DocsQA, shown in qa bot header, you can input some text to override it.

Description

By default the description is @Jina AI, shown in qa bot header, you can input some text to override it.

Server(Required)

Select/Input one server address(you can index the docs by api, once it is done, you can get an server url from your email). The list is including all projects which are ready to use <qa-bot>.

Token

Once you select/input a server, the related token will be generated and shown in the code snippet, prevent exposing server url directly.

Site

QA answers of <qa-bot> will give you a reference link to the original source. You can customize the base URL of the reference link by inputting a url. If left blank, the reference links will be treated relative to current location.

Avatar Url

You can override the avatar by inputting an image url.

Header Background Url

If you want to use an image as the header background, could set it by inputting the image url.

Theme

By default it will refer the system theme color. You can select light or dark to intentionally set the theme, but refer is suggested, which help to keep the same style with the website.

Color

Only be configurable when theme="refer". By default it will refer to the system theme color, you can override it by selecting new color.

Background Color

Only be configurable when theme="refer". By default it will refer to the system theme bg color, if no theme bg color, will use the background color of its parent element, if the bg color is white or transparent, will continue checking the elements upwards until body. you can override it by selecting new color.

Orientation

By default <doc-bot> is fixed at bottom-right, if you intend to have it fixed at the left bottom of the page, you can select bottom-top to decide the animation origin, the supported values: bottom-left, bottom-right, top-left, top-right and center.

Open

By default the chat box is collapsed after load. If you want it to be open by default, check the yes option.

Show tip

By default the chat box is badge only. If you want add a tip beside it, check the yes option.

Tip text

By default the tip text is "Hi there 👋 Ask our docs!". If you want override it, input some new text.

Unknown Answer

By default the unknown answer message is "😵‍💫 I'm sorry but I don't know the answer.". If you want to override it, input the new text, and you can also add a URL to link the user to one specific page, like GitHub issue page.

Target

By default the reference links open to _self. You can override this behavior by selecting other options. Just like a normal <a> tag, for example target="_blank" will open the reference links in a new tab.

Greeting

When you open the <doc-bot>, you will find a short intro headline and a set of sample questions. These were intended to be customized by the users to fit their own needs.

Preview & Code

After the configuration is finished, you could preview the qabot on right section, and go to code tab you see the related code snippet

Integration

Copy the code snippet and insert to your website html body. Congratulations, you have completed the integration now! For most docs projects, you could add the code snippet to _template/page.html.

Yes No
Yes No