Skip to content

Commit

Permalink
docs: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sykp241095 committed Feb 21, 2025
1 parent 1e671f3 commit 7d93f29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ TIDB_SSL=true
#
# Notice: this variable will be deprecated in the future.
EMBEDDING_MAX_TOKENS=2048

# JS Widgets: if you want to use JS widgets, you need to set the following variables to enable CORS.
# BACKEND_CORS_ORIGINS=['http://localhost:3000', 'your-domain.com']
9 changes: 9 additions & 0 deletions frontend/app/src/pages/docs/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

What if you could integrate a conversational search window into your website to facilitate instant responses to product-related queries? With the embeddable JavaScript snippet, you can do just that. This feature allows you to copy and embed a simple JavaScript code snippet into your website, typically placed at the bottom right corner of your site.

## Pre-requisites

If you want to embed the JavaScript snippet into your other website, you need to enable it in `.env` file.

```bash
# JS Widgets: if you want to use JS widgets, you need to set the following variables to enable CORS.
BACKEND_CORS_ORIGINS=['http://localhost:3000', 'your-domain.com']
```

## How to Embed

To embed the JavaScript snippet, follow these steps:
Expand Down

0 comments on commit 7d93f29

Please sign in to comment.