Skip to content

Commit 9b58009

Browse files
committed
chore: aisearch-documents - add callout for api key and search url
1 parent eea2b8e commit 9b58009

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

sqlite-cloud/sqlite-ai/aisearch-documents.mdx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ status: publish
66
slug: aisearch-documents
77
---
88

9+
import Callout from "@commons-components/Information/Callout.astro";
10+
911
This guide shows you how to set up a ready-to-use AI semantic search for your documents and files.
1012
Using the [sqlite-aisearch-action](https://github.com/sqliteai/sqlite-aisearch-action), you can integrate document processing into your GitHub workflow and set up a chatbot on your site in just a few steps.
1113

@@ -32,7 +34,7 @@ jobs:
3234
runs-on: ubuntu-latest
3335
steps:
3436
- uses: actions/checkout@v4
35-
37+
3638
- name: Build AI Search Database
3739
uses: sqliteai/sqlite-aisearch-action@v1
3840
with:
@@ -49,20 +51,21 @@ To enable search functionality on your indexed database, create an Edge Function
4951
1. Access your dashboard at https://dashboard.sqlitecloud.io
5052
2. Navigate to the same project where your database was uploaded
5153
3. Go to the **Edge Functions** section
52-
![AISearch Edge Function](@docs-website-assets/aisearch-docs/edgefn_aisearch.png)
54+
![AISearch Edge Function](@docs-website-assets/aisearch-docs/edgefn_aisearch.png)
5355
4. Create a new `Javascript Function` and copy the code from [aisearch-docs.js](https://github.com/sqliteai/sqlite-aisearch-action/blob/main/search_edge_function_template/aisearch-docs.js) into the editor
5456
5. Deploy and test
5557

5658
### How to Perform a Search
5759

5860
1. Go to **Details** in the Edge Function panel and copy the **Function URL**
59-
![AISearch Edge Function Details](@docs-website-assets/aisearch-docs/edgefn_aisearch_details.png)
61+
![AISearch Edge Function Details](@docs-website-assets/aisearch-docs/edgefn_aisearch_details.png)
6062
2. Execute a GET request with a URL-encoded query as the `query` parameter
6163

62-
Example:
63-
```
64-
GET https://myproject.cloud/v2/functions/aisearch-docs?query=what%27s+Offsync%3F
65-
```
64+
Example:
65+
66+
```
67+
GET https://myproject.cloud/v2/functions/aisearch-docs?query=what%27s+Offsync%3F
68+
```
6669
6770
## Step 3: Integrate the Docs Chatbot in Your Website
6871
@@ -95,6 +98,13 @@ function App() {
9598
}
9699
```
97100

101+
<Callout type="note">
102+
- Replace the `searchUrl` with your **Function URL** from Step 2
103+
- For the `apiKey`, you need to use your admin API key or an API key with read
104+
permissions on your AI docs database. Learn how to create and manage API keys
105+
in the [API Key documentation](/docs/apikey).
106+
</Callout>
107+
98108
### Vanilla JavaScript
99109

100110
For non-React applications, use the web component:

0 commit comments

Comments
 (0)