diff --git a/packages/docsearch-css/README.md b/packages/docsearch-css/README.md index 8c43dc84..6f41be74 100644 --- a/packages/docsearch-css/README.md +++ b/packages/docsearch-css/README.md @@ -5,15 +5,15 @@ Style package for [DocSearch](http://docsearch.algolia.com/), the best search ex ## Installation ```bash -yarn add @docsearch/css@beta +yarn add @docsearch/css@4 # or -npm install @docsearch/css@beta +npm install @docsearch/css@4 ``` If you don’t want to use a package manager, you can use a standalone endpoint: ```html - + ``` ## Get started diff --git a/packages/docsearch-js/README.md b/packages/docsearch-js/README.md index d165a49a..12d5e328 100644 --- a/packages/docsearch-js/README.md +++ b/packages/docsearch-js/README.md @@ -5,9 +5,9 @@ JavaScript package for [DocSearch](http://docsearch.algolia.com/), the best sear ## Installation ```sh -yarn add @docsearch/js@beta +yarn add @docsearch/js@4 # or -npm install @docsearch/js@beta +npm install @docsearch/js@4 ``` ## Get started @@ -15,7 +15,7 @@ npm install @docsearch/js@beta If you don’t want to use a package manager, you can use a standalone endpoint: ```html - + ``` To get started, you need a [`container`](https://docsearch.algolia.com/docs/api#container) for your DocSearch component to go in. If you don’t have one already, you can insert one into your markup: diff --git a/packages/docsearch-react/README.md b/packages/docsearch-react/README.md index bd82131f..199d170e 100644 --- a/packages/docsearch-react/README.md +++ b/packages/docsearch-react/README.md @@ -5,15 +5,15 @@ React package for [DocSearch](http://docsearch.algolia.com/), the best search ex ## Installation ```bash -yarn add @docsearch/react@beta +yarn add @docsearch/react@4 # or -npm install @docsearch/react@beta +npm install @docsearch/react@4 ``` If you don’t want to use a package manager, you can use a standalone endpoint: ```html - + ``` ## Get started diff --git a/packages/docsearch-react/src/AskAiScreen.tsx b/packages/docsearch-react/src/AskAiScreen.tsx index 31ac2eef..dec79714 100644 --- a/packages/docsearch-react/src/AskAiScreen.tsx +++ b/packages/docsearch-react/src/AskAiScreen.tsx @@ -191,7 +191,7 @@ function AskAiExchangeCard({
- {`${translations.duringToolCallText || 'Searching for '} "${part.input || ''}" ...`} + {`${translations.duringToolCallText || 'Searching for '} "${part.input.query || ''}" ...`}
); @@ -215,7 +215,8 @@ function AskAiExchangeCard({ > {' '} "{part.output.query || ''}" - + {' '} + found {part.output.hits?.length || 0} results ); diff --git a/packages/docsearch-react/src/__tests__/utils.test.ts b/packages/docsearch-react/src/__tests__/utils.test.ts index 405c06f8..b34156af 100644 --- a/packages/docsearch-react/src/__tests__/utils.test.ts +++ b/packages/docsearch-react/src/__tests__/utils.test.ts @@ -106,10 +106,13 @@ describe('utils', () => { }, { type: 'tool-searchIndex', - input: 'What is DocSearch', + input: { + query: 'What is DocSearch', + }, state: 'output-available', output: { query: 'DocSearch', + hits: [], }, toolCallId: 'searchIndex-testing', }, diff --git a/packages/docsearch-react/src/types/AskiAi.ts b/packages/docsearch-react/src/types/AskiAi.ts index 98a00e6a..a6599e74 100644 --- a/packages/docsearch-react/src/types/AskiAi.ts +++ b/packages/docsearch-react/src/types/AskiAi.ts @@ -2,10 +2,13 @@ import type { UIMessage } from '@ai-sdk/react'; import type { UIDataTypes, UIMessagePart } from 'ai'; export interface SearchIndexTool { - input: string; - output: { + input: { query: string; }; + output: { + query?: string; + hits?: any[]; + }; } export type AIMessage = UIMessage< diff --git a/packages/website/docs/api.mdx b/packages/website/docs/api.mdx index 249638a1..d54a84d6 100644 --- a/packages/website/docs/api.mdx +++ b/packages/website/docs/api.mdx @@ -6,12 +6,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl'; -:::warning - -DocSearch v4 is currently in beta. While it's suitable for production scenarios, expect potential improvements and minor issues. Use at your discretion. - -::: - ```bash -yarn add @docsearch/js@beta +yarn add @docsearch/js@4 # or with npm -npm install @docsearch/js@beta +npm install @docsearch/js@4 ``` ### Without package manager @@ -40,22 +34,22 @@ npm install @docsearch/js@beta Include CSS in your website's `` ```html - + ``` And the JavaScript at the end of your ``: ```html - + ``` ```bash -yarn add @docsearch/react@beta +yarn add @docsearch/react@4 # or -npm install @docsearch/react@beta +npm install @docsearch/react@4 ``` ### Without package manager @@ -63,13 +57,13 @@ npm install @docsearch/react@beta Include CSS in your website's ``: ```html - + ``` And the JavaScript at the end of your ``: ```html - + ``` @@ -193,7 +187,7 @@ DocSearch v4 introduces support for AskAI, Algolia’s advanced, AI-powered sear To enable AskAI, you can add your Algolia Assistant ID as a string, or use an object for more advanced configuration (such as specifying a different index, credentials, or search parameters): - + ```js diff --git a/packages/website/docs/migrating-from-v3.md b/packages/website/docs/migrating-from-v3.md index cce78def..233af852 100644 --- a/packages/website/docs/migrating-from-v3.md +++ b/packages/website/docs/migrating-from-v3.md @@ -2,12 +2,6 @@ title: Migrating from v3 to v4 --- -:::warning - -DocSearch v4 is currently in beta. While it's suitable for production scenarios, expect potential improvements and minor issues. Use at your discretion. - -::: - This guide provides detailed information on migrating from [DocSearch v3](/docs/v3/docsearch) to [DocSearch v4](/docs/docsearch), highlighting key differences and new configuration options. For a comprehensive overview, refer to the [API reference](/docs/api) and [Getting Started Guide](/docs/docsearch). ## If You're Using Algolia Keyword Search Only diff --git a/packages/website/docs/styling.md b/packages/website/docs/styling.md index 1a7a8d1d..291c0ce9 100644 --- a/packages/website/docs/styling.md +++ b/packages/website/docs/styling.md @@ -27,15 +27,15 @@ This package is a dependency of [`@docsearch/js`][1] and [`@docsearch/react`][1] ## Installation ```bash -yarn add @docsearch/css@beta +yarn add @docsearch/css@4 # or -npm install @docsearch/css@beta +npm install @docsearch/css@4 ``` If you don’t want to use a package manager, you can use a standalone endpoint: ```html - + ``` ## Files diff --git a/packages/website/docs/v4/askai-api.mdx b/packages/website/docs/v4/askai-api.mdx index 492c92f9..dd6161f4 100644 --- a/packages/website/docs/v4/askai-api.mdx +++ b/packages/website/docs/v4/askai-api.mdx @@ -13,10 +13,6 @@ The Ask AI API enables developers to build custom chat interfaces powered by Alg - Authorization token authentication for secure API access - Full compatibility with popular frameworks like Next.js and Vercel AI SDK -:::warning -Ask AI is a **private beta** feature under the [Algolia Terms of Service ("Beta Services")](https://www.algolia.com/policies/terms/). -Use of this feature is subject to [Algolia's GenAI Addendum](https://www.algolia.com/policies/algolia-genai-addendum). -::: :::info This API documentation is primarily for developers building custom Ask AI integrations. If you're using the DocSearch package, you typically won't need this information since DocSearch handles the Ask AI API integration automatically. For standard DocSearch usage, see the [DocSearch documentation](/docs/docsearch) instead. diff --git a/packages/website/docusaurus.config.mjs b/packages/website/docusaurus.config.mjs index 904701d5..d2a0efa1 100644 --- a/packages/website/docusaurus.config.mjs +++ b/packages/website/docusaurus.config.mjs @@ -38,13 +38,13 @@ export default { editUrl: 'https://github.com/algolia/docsearch/edit/main/packages/website/', versions: { current: { - label: 'Beta (v4.x)', + label: 'Stable (v4.x)', }, v3: { - label: 'Stable (v3.x)', + label: 'Legacy (v3.x)', }, legacy: { - label: 'Legacy', + label: 'Legacy (v1.x - v2.x)', }, }, lastVersion: 'current', @@ -128,7 +128,7 @@ export default { announcementBar: { id: 'announcement-bar', content: - '🚀 Ask AI now in Public Beta! Turn your docs site search into an AI-powered assistant – faster answers, fewer tickets, better self-serve. Get Started Now', + '🚀 Use AskAI Now! Turn your docs site search into an AI-powered assistant – faster answers, fewer tickets, better self-serve. Get Started Now', }, colorMode: { defaultMode: 'light', diff --git a/packages/website/sidebars.js b/packages/website/sidebars.js index 7fae1896..06e1c64e 100644 --- a/packages/website/sidebars.js +++ b/packages/website/sidebars.js @@ -23,7 +23,7 @@ export default { }, { type: 'category', - label: 'Algolia AskAI - Beta', + label: 'Algolia AskAI', items: [ 'v4/askai', 'v4/askai-api',