-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add docs to demonstrate how to embed js to user website (#120)
- Loading branch information
1 parent
00fad6e
commit 3f0a400
Showing
4 changed files
with
34 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Embeddable JavaScript Snippet | ||
|
||
This is the **key feature** of our conversational search RAG (Retrieval-Augmented Generation) app. | ||
|
||
With little effort, you can integrate our conversational search window into your website by copying and embedding a simple JavaScript code snippet. This widget, typically placed at the bottom right corner of your site, facilitates instant responses to product-related queries. | ||
|
||
|
||
## How to Embed | ||
|
||
To embed the JavaScript snippet, follow these steps: | ||
|
||
1. Enter Settings > JavaScript, and copy the JavaScript code snippet like this: | ||
|
||
![embeddable-javascript-snippet](https://github.com/pingcap/tidb.ai/assets/1237528/999ed8b7-9ed1-4bad-a75e-3395d1ae68d5) | ||
|
||
|
||
2. Paste the JavaScript code snippet into your website's HTML file; | ||
|
||
3. Initialize the JavaScript snippet with input parameters like `Widget Title`, `Site Name`, `Search Titles`, `Example Questions`, `Footer Links`, and `Social Media Links`; | ||
|
||
4. Restart your website to see the conversational search window appear at the bottom right corner of your site. | ||
|
||
![embeddable-javascript-snippet](https://github.com/pingcap/tidb.ai/assets/1237528/5a445231-a27a-4ae6-8287-a4f8cf7b64d0 "Image Title") | ||
|
||
|
||
|
||
|
||
That's all you need to do to integrate our conversational search window into your website. Enjoy! | ||
|
||
|
||
You can also go to https://tidb.ai to experience the live demo. |