From 260a44c9878cbf5a88149b4c5e5910dcd61616cd Mon Sep 17 00:00:00 2001 From: Daniele Briggi Date: Fri, 24 Oct 2025 15:48:32 +0200 Subject: [PATCH 1/7] feat(aisearch): aisearch-action guide --- sqlite-cloud/_nav.ts | 1 + sqlite-cloud/sqlite-ai/aisearch-documents.mdx | 65 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 sqlite-cloud/sqlite-ai/aisearch-documents.mdx diff --git a/sqlite-cloud/_nav.ts b/sqlite-cloud/_nav.ts index d66e587..6bc103e 100644 --- a/sqlite-cloud/_nav.ts +++ b/sqlite-cloud/_nav.ts @@ -44,6 +44,7 @@ const sidebarNav: SidebarNavStruct = [ { title: "cloudsync_network_logout", filePath: "sqlite-sync-api-cloudsync-network-logout", type: "inner", level: 2 }, { title: "SQLite-Vector", filePath: "sqlite-vector", type: "inner", level: 0 }, { title: "MCP (Model Context Protocol)", filePath: "mcp-server", type: "inner", level: 0 }, + { title: "AI Search for your documents", filePath: "aisearch-documents", type: "inner", level: 0 }, // ### CLOUD ### { title: "Cloud", type: "secondary", icon: "docs-star",}, diff --git a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx new file mode 100644 index 0000000..d5c6f1a --- /dev/null +++ b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx @@ -0,0 +1,65 @@ +--- +title: AI Search for your documents and files +description: SQLite AI Search for your documents and files +category: platform +status: publish +slug: aisearch-documents +--- + +This guide shows you how to set up a ready-to-use AI semantic search for your documents and files. +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 chat bot on your site in just a few steps. + +The semantic search is powered by [SQLite RAG](https://github.com/sqliteai/sqlite-rag). + +## Set Up Your GitHub Workflow + +1. **Get Your Connection String**: Ensure you have a project on the [SQLite Cloud dashboard](https://dashboard.sqlitecloud.io). If not, sign up for [SQLite AI](https://sqlite.ai) to create one for free. + +2. **Set GitHub Secret**: Add your connection string as `SQLITECLOUD_CONNECTION_STRING` in your repository secrets. + +3. **Add to Workflow**: Create or update your GitHub workflow: + +```yaml +name: AI Search Index + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + build-search: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build AI Search Database + uses: sqliteai/sqlite-aisearch-action@v1 + with: + connection_string: ${{ secrets.SQLITECLOUD_CONNECTION_STRING }} + base_url: https://docs.yoursite.com + database_name: aidocs_search.db + source_files: ./path/to/documents +``` + +## Create the Search Edge Function + +To enable search functionality on your indexed database, create an Edge Function using the provided template: + +1. Access your dashboard at https://dashboard.sqlitecloud.io +2. Navigate to the same project where your database was uploaded +3. Go to the **Edge Functions** section +![AISearch Edge Function](@docs-website-assets/aisearch-docs/edgefn_aisearch.png) +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 +5. Deploy and test + +### How to Perform a Search + +1. Go to **Details** in the Edge Function panel and copy the **Function URL** +![AISearch Edge Function Details](@docs-website-assets/aisearch-docs/edgefn_aisearch_details.png) +2. Execute a GET request with a URL-encoded query as the `query` parameter + + Example: + ``` + GET https://myproject.cloud/v2/functions/aisearch-docs?query=what%27s+Offsync%3F + ``` From 5dd6ccb640a394e439f23547bd5e0039e64e555c Mon Sep 17 00:00:00 2001 From: damlayildiz Date: Fri, 24 Oct 2025 17:18:09 +0200 Subject: [PATCH 2/7] chore: update aisearch-documents w/ docs-chatbot integration --- sqlite-cloud/sqlite-ai/aisearch-documents.mdx | 62 ++++++++++++++++++- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx index d5c6f1a..c2a1d4a 100644 --- a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx +++ b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx @@ -7,11 +7,11 @@ slug: aisearch-documents --- This guide shows you how to set up a ready-to-use AI semantic search for your documents and files. -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 chat bot on your site in just a few steps. +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. The semantic search is powered by [SQLite RAG](https://github.com/sqliteai/sqlite-rag). -## Set Up Your GitHub Workflow +## Step 1: Set Up Your GitHub Workflow 1. **Get Your Connection String**: Ensure you have a project on the [SQLite Cloud dashboard](https://dashboard.sqlitecloud.io). If not, sign up for [SQLite AI](https://sqlite.ai) to create one for free. @@ -42,7 +42,7 @@ jobs: source_files: ./path/to/documents ``` -## Create the Search Edge Function +## Step 2: Create the Search Edge Function To enable search functionality on your indexed database, create an Edge Function using the provided template: @@ -63,3 +63,59 @@ To enable search functionality on your indexed database, create an Edge Function ``` GET https://myproject.cloud/v2/functions/aisearch-docs?query=what%27s+Offsync%3F ``` + +## Integrate the Docs Chatbot in Your Website + +Once you have your search edge function deployed, you can easily add an interactive AI chatbot to your website. The chatbot provides a user-friendly interface for your documentation search, powered by the indexed content. + +### React Integration + +Install the chatbot package: + +```bash +npm install @sqliteai/docs-chatbot +``` + +Then add it to your React application: + +```tsx +import { DocsChatbot } from "@sqliteai/docs-chatbot"; +import "@sqliteai/docs-chatbot/style.css"; + +function App() { + return ( + + ); +} +``` + +### Vanilla JavaScript + +For non-React applications, use the web component: + +```html + + + + + + + + + + + + + +``` + +By default, the chatbot displays as a floating button in the bottom-right corner. +For advanced configuration options including custom triggers, theming, and API reference, see the [full docs chatbot documentation](https://github.com/sqliteai/docs-chatbot). From a661efdeab78aea5beab3b4e7bb860be9ca8036a Mon Sep 17 00:00:00 2001 From: damlayildiz Date: Fri, 24 Oct 2025 17:21:00 +0200 Subject: [PATCH 3/7] chore: update aisearch-documents --- sqlite-cloud/sqlite-ai/aisearch-documents.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx index c2a1d4a..30da6c4 100644 --- a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx +++ b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx @@ -64,7 +64,7 @@ To enable search functionality on your indexed database, create an Edge Function GET https://myproject.cloud/v2/functions/aisearch-docs?query=what%27s+Offsync%3F ``` -## Integrate the Docs Chatbot in Your Website +## Step 3: Integrate the Docs Chatbot in Your Website Once you have your search edge function deployed, you can easily add an interactive AI chatbot to your website. The chatbot provides a user-friendly interface for your documentation search, powered by the indexed content. From 5e9ff10d5cb9cfca2e24a9f6a1533446eb4c98d6 Mon Sep 17 00:00:00 2001 From: damlayildiz Date: Fri, 24 Oct 2025 17:32:19 +0200 Subject: [PATCH 4/7] chore: aisearch-documents - add image for chatbot --- sqlite-cloud/sqlite-ai/aisearch-documents.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx index 30da6c4..710a097 100644 --- a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx +++ b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx @@ -68,6 +68,8 @@ To enable search functionality on your indexed database, create an Edge Function Once you have your search edge function deployed, you can easily add an interactive AI chatbot to your website. The chatbot provides a user-friendly interface for your documentation search, powered by the indexed content. +![Docs Chatbot](@docs-website-assets/aisearch-docs/docs_chatbot.png) + ### React Integration Install the chatbot package: From eea2b8ea0010458d432fc44c9000b9695e01a463 Mon Sep 17 00:00:00 2001 From: damlayildiz Date: Fri, 24 Oct 2025 17:38:17 +0200 Subject: [PATCH 5/7] chore: aisearch-documents - update title and section name --- sqlite-cloud/_nav.ts | 351 ++++++++++++++---- sqlite-cloud/sqlite-ai/aisearch-documents.mdx | 2 +- 2 files changed, 284 insertions(+), 69 deletions(-) diff --git a/sqlite-cloud/_nav.ts b/sqlite-cloud/_nav.ts index 6bc103e..8919cfc 100644 --- a/sqlite-cloud/_nav.ts +++ b/sqlite-cloud/_nav.ts @@ -3,87 +3,302 @@ import type { SidebarNavStruct } from "@docs-website/types/sidebar-navigation"; const sidebarNav: SidebarNavStruct = [ { title: "", type: "primary" }, // ### AI ### - { title: "AI", type: "secondary", icon: "docs-star",}, + { title: "AI", type: "secondary", icon: "docs-star" }, { title: "Overview", filePath: "ai-overview", type: "inner", level: 0 }, { title: "SQLite-AI", filePath: "sqlite-ai", type: "inner", level: 0 }, { title: "SQLite-JS", filePath: "sqlite-js", type: "inner", level: 0 }, { title: "SQLite-Sync", type: "inner", level: 0 }, - { title: "Introduction", filePath: "sqlite-sync-introduction", type: "inner", level: 1 }, - { title: "Getting Started", filePath: "sqlite-sync-getting-started", type: "inner", level: 1 }, - { title: "Best Practices", filePath: "sqlite-sync-best-practices", type: "inner", level: 1 }, - { title: "Quick Starts", type: "inner", level: 1 }, - { title: "Android", filePath: "sqlite-sync-quick-start-android", type: "inner", level: 2 }, - { title: "iOS", filePath: "sqlite-sync-quick-start-ios", type: "inner", level: 2 }, - { title: "Linux", filePath: "sqlite-sync-quick-start-linux", type: "inner", level: 2 }, - { title: "macOS", filePath: "sqlite-sync-quick-start-macos", type: "inner", level: 2 }, - { title: "React Native Expo", filePath: "sqlite-sync-quick-start-expo", type: "inner", level: 2 }, - { title: "WASM", filePath: "sqlite-sync-quick-start-wasm", type: "inner", level: 2 }, - { title: "Windows", filePath: "sqlite-sync-quick-start-windows", type: "inner", level: 2 }, - { title: "API Reference", type: "inner", level: 1 }, - { title: "cloudsync_init", filePath: "sqlite-sync-api-cloudsync-init", type: "inner", level: 2 }, - { title: "cloudsync_enable", filePath: "sqlite-sync-api-cloudsync-enable", type: "inner", level: 2 }, - { title: "cloudsync_disable", filePath: "sqlite-sync-api-cloudsync-disable", type: "inner", level: 2 }, - { title: "cloudsync_is_enabled", filePath: "sqlite-sync-api-cloudsync-is-enabled", type: "inner", level: 2 }, - { title: "cloudsync_cleanup", filePath: "sqlite-sync-api-cloudsync-cleanup", type: "inner", level: 2 }, - { title: "cloudsync_terminate", filePath: "sqlite-sync-api-cloudsync-terminate", type: "inner", level: 2 }, - { title: "cloudsync_version", filePath: "sqlite-sync-api-cloudsync-version", type: "inner", level: 2 }, - { title: "cloudsync_siteid", filePath: "sqlite-sync-api-cloudsync-siteid", type: "inner", level: 2 }, - { title: "cloudsync_db_version", filePath: "sqlite-sync-api-cloudsync-db-version", type: "inner", level: 2 }, - { title: "cloudsync_uuid", filePath: "sqlite-sync-api-cloudsync-uuid", type: "inner", level: 2 }, - { title: "cloudsync_begin_alter", filePath: "sqlite-sync-api-cloudsync-begin-alter", type: "inner", level: 2 }, - { title: "cloudsync_commit_alter", filePath: "sqlite-sync-api-cloudsync-commit-alter", type: "inner", level: 2 }, - { title: "cloudsync_network_init", filePath: "sqlite-sync-api-cloudsync-network-init", type: "inner", level: 2 }, - { title: "cloudsync_network_cleanup", filePath: "sqlite-sync-api-cloudsync-network-cleanup", type: "inner", level: 2 }, - { title: "cloudsync_network_set_token", filePath: "sqlite-sync-api-cloudsync-network-set-token", type: "inner", level: 2 }, - { title: "cloudsync_network_set_apikey", filePath: "sqlite-sync-api-cloudsync-network-set-apikey", type: "inner", level: 2 }, - { title: "cloudsync_network_has_unsent_changes", filePath: "sqlite-sync-api-cloudsync-network-has-unsent-changes", type: "inner", level: 2 }, - { title: "cloudsync_network_send_changes", filePath: "sqlite-sync-api-cloudsync-network-send-changes", type: "inner", level: 2 }, - { title: "cloudsync_network_check_changes", filePath: "sqlite-sync-api-cloudsync-network-check-changes", type: "inner", level: 2 }, - { title: "cloudsync_network_sync", filePath: "sqlite-sync-api-cloudsync-network-sync", type: "inner", level: 2 }, - { title: "cloudsync_network_reset_sync_version", filePath: "sqlite-sync-api-cloudsync-network-reset-sync-version", type: "inner", level: 2 }, - { title: "cloudsync_network_logout", filePath: "sqlite-sync-api-cloudsync-network-logout", type: "inner", level: 2 }, - { title: "SQLite-Vector", filePath: "sqlite-vector", type: "inner", level: 0 }, - { title: "MCP (Model Context Protocol)", filePath: "mcp-server", type: "inner", level: 0 }, - { title: "AI Search for your documents", filePath: "aisearch-documents", type: "inner", level: 0 }, + { + title: "Introduction", + filePath: "sqlite-sync-introduction", + type: "inner", + level: 1, + }, + { + title: "Getting Started", + filePath: "sqlite-sync-getting-started", + type: "inner", + level: 1, + }, + { + title: "Best Practices", + filePath: "sqlite-sync-best-practices", + type: "inner", + level: 1, + }, + { title: "Quick Starts", type: "inner", level: 1 }, + { + title: "Android", + filePath: "sqlite-sync-quick-start-android", + type: "inner", + level: 2, + }, + { + title: "iOS", + filePath: "sqlite-sync-quick-start-ios", + type: "inner", + level: 2, + }, + { + title: "Linux", + filePath: "sqlite-sync-quick-start-linux", + type: "inner", + level: 2, + }, + { + title: "macOS", + filePath: "sqlite-sync-quick-start-macos", + type: "inner", + level: 2, + }, + { + title: "React Native Expo", + filePath: "sqlite-sync-quick-start-expo", + type: "inner", + level: 2, + }, + { + title: "WASM", + filePath: "sqlite-sync-quick-start-wasm", + type: "inner", + level: 2, + }, + { + title: "Windows", + filePath: "sqlite-sync-quick-start-windows", + type: "inner", + level: 2, + }, + { title: "API Reference", type: "inner", level: 1 }, + { + title: "cloudsync_init", + filePath: "sqlite-sync-api-cloudsync-init", + type: "inner", + level: 2, + }, + { + title: "cloudsync_enable", + filePath: "sqlite-sync-api-cloudsync-enable", + type: "inner", + level: 2, + }, + { + title: "cloudsync_disable", + filePath: "sqlite-sync-api-cloudsync-disable", + type: "inner", + level: 2, + }, + { + title: "cloudsync_is_enabled", + filePath: "sqlite-sync-api-cloudsync-is-enabled", + type: "inner", + level: 2, + }, + { + title: "cloudsync_cleanup", + filePath: "sqlite-sync-api-cloudsync-cleanup", + type: "inner", + level: 2, + }, + { + title: "cloudsync_terminate", + filePath: "sqlite-sync-api-cloudsync-terminate", + type: "inner", + level: 2, + }, + { + title: "cloudsync_version", + filePath: "sqlite-sync-api-cloudsync-version", + type: "inner", + level: 2, + }, + { + title: "cloudsync_siteid", + filePath: "sqlite-sync-api-cloudsync-siteid", + type: "inner", + level: 2, + }, + { + title: "cloudsync_db_version", + filePath: "sqlite-sync-api-cloudsync-db-version", + type: "inner", + level: 2, + }, + { + title: "cloudsync_uuid", + filePath: "sqlite-sync-api-cloudsync-uuid", + type: "inner", + level: 2, + }, + { + title: "cloudsync_begin_alter", + filePath: "sqlite-sync-api-cloudsync-begin-alter", + type: "inner", + level: 2, + }, + { + title: "cloudsync_commit_alter", + filePath: "sqlite-sync-api-cloudsync-commit-alter", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_init", + filePath: "sqlite-sync-api-cloudsync-network-init", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_cleanup", + filePath: "sqlite-sync-api-cloudsync-network-cleanup", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_set_token", + filePath: "sqlite-sync-api-cloudsync-network-set-token", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_set_apikey", + filePath: "sqlite-sync-api-cloudsync-network-set-apikey", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_has_unsent_changes", + filePath: "sqlite-sync-api-cloudsync-network-has-unsent-changes", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_send_changes", + filePath: "sqlite-sync-api-cloudsync-network-send-changes", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_check_changes", + filePath: "sqlite-sync-api-cloudsync-network-check-changes", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_sync", + filePath: "sqlite-sync-api-cloudsync-network-sync", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_reset_sync_version", + filePath: "sqlite-sync-api-cloudsync-network-reset-sync-version", + type: "inner", + level: 2, + }, + { + title: "cloudsync_network_logout", + filePath: "sqlite-sync-api-cloudsync-network-logout", + type: "inner", + level: 2, + }, + { + title: "SQLite-Vector", + filePath: "sqlite-vector", + type: "inner", + level: 0, + }, + { + title: "MCP (Model Context Protocol)", + filePath: "mcp-server", + type: "inner", + level: 0, + }, + { + title: "AI-Powered Docs Search", + filePath: "aisearch-documents", + type: "inner", + level: 0, + }, // ### CLOUD ### - { title: "Cloud", type: "secondary", icon: "docs-star",}, + { title: "Cloud", type: "secondary", icon: "docs-star" }, { title: "Overview", filePath: "overview", type: "inner", level: 0 }, { title: "Scaling", filePath: "architecture", type: "inner", level: 0 }, { title: "Getting Started", type: "inner", level: 0 }, - { title: "Connecting", filePath: "connect-cluster", type: "inner", level: 1 }, - { title: "Creating a database", filePath: "create-database", type: "inner", level: 1 }, - { title: "Writing data", filePath: "write-data", type: "inner", level: 1 }, + { title: "Connecting", filePath: "connect-cluster", type: "inner", level: 1 }, + { + title: "Creating a database", + filePath: "create-database", + type: "inner", + level: 1, + }, + { title: "Writing data", filePath: "write-data", type: "inner", level: 1 }, { title: "Quick Start Guides", type: "inner", level: 0 }, - { title: "CDN", filePath: "quick-start-cdn", type: "inner", level: 1 }, - { title: "Node.js", filePath: "quick-start-node", type: "inner", level: 1 }, - { title: "React", filePath: "quick-start-react", type: "inner", level: 1 }, - { title: "React Native", filePath: "quick-start-react-native", type: "inner", level: 1 }, - { title: "Apollo / GraphQL", filePath: "quick-start-apollo-graphql", type: "inner", level: 1 }, - { title: "Next.js", filePath: "quick-start-next", type: "inner", level: 1 }, - { title: "Django", filePath: "quick-start-django", type: "inner", level: 1 }, - { title: "Flask", filePath: "quick-start-flask", type: "inner", level: 1 }, - { title: "SQLAlchemy", filePath: "quick-start-sqlalchemy-orm", type: "inner", level: 1 }, - { title: "Streamlit", filePath: "quick-start-streamlit", type: "inner", level: 1 }, - { title: "PHP / Laravel", filePath: "quick-start-php-laravel", type: "inner", level: 1 }, - { title: "Gin", filePath: "quick-start-gin", type: "inner", level: 1 }, - { title: "Knex.js", filePath: "quick-start-knex", type: "inner", level: 1 }, + { title: "CDN", filePath: "quick-start-cdn", type: "inner", level: 1 }, + { title: "Node.js", filePath: "quick-start-node", type: "inner", level: 1 }, + { title: "React", filePath: "quick-start-react", type: "inner", level: 1 }, + { + title: "React Native", + filePath: "quick-start-react-native", + type: "inner", + level: 1, + }, + { + title: "Apollo / GraphQL", + filePath: "quick-start-apollo-graphql", + type: "inner", + level: 1, + }, + { title: "Next.js", filePath: "quick-start-next", type: "inner", level: 1 }, + { title: "Django", filePath: "quick-start-django", type: "inner", level: 1 }, + { title: "Flask", filePath: "quick-start-flask", type: "inner", level: 1 }, + { + title: "SQLAlchemy", + filePath: "quick-start-sqlalchemy-orm", + type: "inner", + level: 1, + }, + { + title: "Streamlit", + filePath: "quick-start-streamlit", + type: "inner", + level: 1, + }, + { + title: "PHP / Laravel", + filePath: "quick-start-php-laravel", + type: "inner", + level: 1, + }, + { title: "Gin", filePath: "quick-start-gin", type: "inner", level: 1 }, + { title: "Knex.js", filePath: "quick-start-knex", type: "inner", level: 1 }, // ### PLATFORM ### { title: "Platform", type: "secondary", icon: "docs-plat" }, - { title: "Edge Functions", filePath: "edge-functions", type: "inner", level: 0 }, - { title: "Webhooks", filePath: "webhooks", type: "inner", level: 0 }, - { title: "Pub/Sub", filePath: "pub-sub", type: "inner", level: 0 }, - //{ title: "Vector", filePath: "vector", type: "inner", level: 0 }, - { title: "Users and Roles", filePath: "security", type: "inner", level: 0 }, - { title: "API Keys", filePath: "apikey", type: "inner", level: 0 }, - { title: "Row-Level Security", filePath: "rls", type: "inner", level: 0}, - { title: "OffSync", filePath: "offsync", type: "inner", level: 0 }, - { title: "Access Tokens", filePath: "access-tokens", type: "inner", level: 0 }, - { title: "Backups", filePath: "backups", type: "inner", level: 0 }, - { title: "Query Analyzer", filePath: "analyzer", type: "inner", level: 0 }, - { title: "Extensions", filePath: "extensions", type: "inner", level: 0 }, - { title: "Weblite (REST API)", filePath: "weblite", type: "inner", level: 0 }, + { + title: "Edge Functions", + filePath: "edge-functions", + type: "inner", + level: 0, + }, + { title: "Webhooks", filePath: "webhooks", type: "inner", level: 0 }, + { title: "Pub/Sub", filePath: "pub-sub", type: "inner", level: 0 }, + //{ title: "Vector", filePath: "vector", type: "inner", level: 0 }, + { title: "Users and Roles", filePath: "security", type: "inner", level: 0 }, + { title: "API Keys", filePath: "apikey", type: "inner", level: 0 }, + { title: "Row-Level Security", filePath: "rls", type: "inner", level: 0 }, + { title: "OffSync", filePath: "offsync", type: "inner", level: 0 }, + { + title: "Access Tokens", + filePath: "access-tokens", + type: "inner", + level: 0, + }, + { title: "Backups", filePath: "backups", type: "inner", level: 0 }, + { title: "Query Analyzer", filePath: "analyzer", type: "inner", level: 0 }, + { title: "Extensions", filePath: "extensions", type: "inner", level: 0 }, + { title: "Weblite (REST API)", filePath: "weblite", type: "inner", level: 0 }, // ### CLOUD SDK ### { title: "Cloud SDK", type: "secondary", icon: "docs-sdk" }, diff --git a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx index 710a097..1ec09a4 100644 --- a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx +++ b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx @@ -1,5 +1,5 @@ --- -title: AI Search for your documents and files +title: Build AI Search for Your Documentation description: SQLite AI Search for your documents and files category: platform status: publish From 9b58009e4813e6a1787e0cfdecbdd5d427edd5d9 Mon Sep 17 00:00:00 2001 From: damlayildiz Date: Mon, 27 Oct 2025 10:43:04 +0100 Subject: [PATCH 6/7] chore: aisearch-documents - add callout for api key and search url --- sqlite-cloud/sqlite-ai/aisearch-documents.mdx | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx index 1ec09a4..4c3ea20 100644 --- a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx +++ b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx @@ -6,6 +6,8 @@ status: publish slug: aisearch-documents --- +import Callout from "@commons-components/Information/Callout.astro"; + This guide shows you how to set up a ready-to-use AI semantic search for your documents and files. 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. @@ -32,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Build AI Search Database uses: sqliteai/sqlite-aisearch-action@v1 with: @@ -49,20 +51,21 @@ To enable search functionality on your indexed database, create an Edge Function 1. Access your dashboard at https://dashboard.sqlitecloud.io 2. Navigate to the same project where your database was uploaded 3. Go to the **Edge Functions** section -![AISearch Edge Function](@docs-website-assets/aisearch-docs/edgefn_aisearch.png) + ![AISearch Edge Function](@docs-website-assets/aisearch-docs/edgefn_aisearch.png) 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 5. Deploy and test ### How to Perform a Search 1. Go to **Details** in the Edge Function panel and copy the **Function URL** -![AISearch Edge Function Details](@docs-website-assets/aisearch-docs/edgefn_aisearch_details.png) + ![AISearch Edge Function Details](@docs-website-assets/aisearch-docs/edgefn_aisearch_details.png) 2. Execute a GET request with a URL-encoded query as the `query` parameter - Example: - ``` - GET https://myproject.cloud/v2/functions/aisearch-docs?query=what%27s+Offsync%3F - ``` + Example: + + ``` + GET https://myproject.cloud/v2/functions/aisearch-docs?query=what%27s+Offsync%3F + ``` ## Step 3: Integrate the Docs Chatbot in Your Website @@ -95,6 +98,13 @@ function App() { } ``` + + - Replace the `searchUrl` with your **Function URL** from Step 2 + - For the `apiKey`, you need to use your admin API key or an API key with read + permissions on your AI docs database. Learn how to create and manage API keys + in the [API Key documentation](/docs/apikey). + + ### Vanilla JavaScript For non-React applications, use the web component: From b5c46c15ab06346386bb25d95d3e6211b070a470 Mon Sep 17 00:00:00 2001 From: damlayildiz Date: Mon, 27 Oct 2025 10:46:29 +0100 Subject: [PATCH 7/7] chore: update aisearch-documents --- sqlite-cloud/sqlite-ai/aisearch-documents.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx index 4c3ea20..e3f7588 100644 --- a/sqlite-cloud/sqlite-ai/aisearch-documents.mdx +++ b/sqlite-cloud/sqlite-ai/aisearch-documents.mdx @@ -100,7 +100,7 @@ function App() { - Replace the `searchUrl` with your **Function URL** from Step 2 - - For the `apiKey`, you need to use your admin API key or an API key with read + - For the `apiKey`, you need to use an API key with read permissions on your AI docs database. Learn how to create and manage API keys in the [API Key documentation](/docs/apikey).