Translate the Algolia search docs updates

pull/5402/head
Paul Jankowski 2 weeks ago
parent d207e200ea
commit 761cb4494d
No known key found for this signature in database

@ -198,7 +198,7 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...' indices: ['...']
} }
} }
} }
@ -216,10 +216,14 @@ Puedes utilizar una configuración como esta para utilizar la búsqueda multilin
</details> </details>
Consulta la [documentación oficial de Algolia](https://docsearch.algolia.com/docs/api#translations) para conocer más detalles. Para empezar rápidamente, también puedes copiar las traducciones usadas por este sitio desde [nuestro repositorio de GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). Consulta la [documentación oficial de Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations) para conocer más detalles. Para empezar rápidamente, también puedes copiar las traducciones usadas por este sitio desde [nuestro repositorio de GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code).
### Algolia Ask AI Support {#ask-ai} ### Algolia Ask AI Support {#ask-ai}
::: note Nota
A partir de `v5.0.0`, Ask AI ahora utiliza [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) de Algolia como backend. Hay disponible una [guía de migración](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) de Ask AI -> Agent Studio para facilitar la transición.
:::
Si deseas incluir **Ask AI**, pasa la opción `askAi` (o alguno de sus campos parciales) dentro de `options`: Si deseas incluir **Ask AI**, pasa la opción `askAi` (o alguno de sus campos parciales) dentro de `options`:
```ts ```ts
@ -232,16 +236,15 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
// askAi: "TU-ID-DE-ASISTENTE" // askAi: "TU-ID-DE-AGENTE"
// O // O
askAi: { askAi: {
// como mínimo debes proporcionar el assistantId que recibiste de Algolia // como mínimo debes proporcionar el agentId que recibiste de Algolia
assistantId: 'XXXYYY', agentId: 'XXXYYY',
// anulaciones opcionales — si se omiten, se reutilizan los valores appId/apiKey/indexName de nivel superior // anulaciones opcionales — si se omiten, se reutilizan los valores appId/apiKey de nivel superior
// apiKey: '...', // apiKey: '...',
// appId: '...', // appId: '...',
// indexName: '...'
} }
} }
} }
@ -255,7 +258,7 @@ Si prefieres solo la búsqueda por palabra clave y no la Ask AI, simplemente omi
### Panel lateral de Ask AI {#ask-ai-side-panel} ### Panel lateral de Ask AI {#ask-ai-side-panel}
DocSearch v4.5+ admite un **panel lateral de Ask AI** opcional. Cuando está habilitado, se puede abrir con **Ctrl/Cmd+I** por defecto. La [Referencia de API del Panel Lateral](https://docsearch.algolia.com/docs/sidepanel/api-reference) contiene la lista completa de opciones. DocSearch v4.5+ admite un **panel lateral de Ask AI** opcional. Cuando está habilitado, se puede abrir con **Ctrl/Cmd+I** por defecto. La [Referencia de API del Panel Lateral](https://docsearch.algolia.com/docs/packages/sidepanel/api) contiene la lista completa de opciones.
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -267,9 +270,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
// Refleja la API de @docsearch/sidepanel-js SidepanelProps // Refleja la API de @docsearch/sidepanel-js SidepanelProps
panel: { panel: {
@ -299,9 +302,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
keyboardShortcuts: { keyboardShortcuts: {
'Ctrl/Cmd+I': false 'Ctrl/Cmd+I': false
@ -337,10 +340,9 @@ export default defineConfig({
options: { options: {
mode: 'sidePanel', mode: 'sidePanel',
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...',
sidePanel: true sidePanel: true
} }
} }

@ -198,7 +198,7 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...' indices: ['...']
} }
} }
} }
@ -216,10 +216,14 @@ export default defineConfig({
</details> </details>
برای اطلاعات بیشتر به [مستندات رسمی Algolia](https://docsearch.algolia.com/docs/api#translations) مراجعه کنید. برای شروع سریع‌تر، می‌توانید ترجمه‌های استفاده‌شده در این سایت را از [مخزن GitHub ما](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code) کپی کنید. برای اطلاعات بیشتر به [مستندات رسمی Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations) مراجعه کنید. برای شروع سریع‌تر، می‌توانید ترجمه‌های استفاده‌شده در این سایت را از [مخزن GitHub ما](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code) کپی کنید.
### پشتیبانی Algolia Ask AI {#ask-ai} ### پشتیبانی Algolia Ask AI {#ask-ai}
::: note نکته
از نسخه `v5.0.0`، Ask AI اکنون از [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) شرکت Algolia به‌عنوان بک‌اند خود استفاده می‌کند. برای تسهیل این انتقال، [راهنمای مهاجرت Ask AI به Agent Studio](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) در دسترس است.
:::
برای فعال‌سازی **Ask AI** کافی است گزینه `askAi` را اضافه کنید: برای فعال‌سازی **Ask AI** کافی است گزینه `askAi` را اضافه کنید:
```ts ```ts
@ -232,16 +236,15 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
// askAi: "شناسه-دستیار-شما" // askAi: "شناسه-عامل-شما"
// یا // یا
askAi: { askAi: {
// حداقل باید assistantId دریافت شده از Algolia را ارائه کنید // حداقل باید agentId دریافت شده از Algolia را ارائه کنید
assistantId: 'XXXYYY', agentId: 'XXXYYY',
// بازنویسی های اختیاری — اگر حذف شوند، مقادیر appId/apiKey/indexName سطح بالا دوباره استفاده می شوند // بازنویسی های اختیاری — اگر حذف شوند، مقادیر appId/apiKey سطح بالا دوباره استفاده می شوند
// apiKey: '...', // apiKey: '...',
// appId: '...', // appId: '...',
// indexName: '...'
} }
} }
} }
@ -255,7 +258,7 @@ export default defineConfig({
### پنل کناری Ask AI {#ask-ai-side-panel} ### پنل کناری Ask AI {#ask-ai-side-panel}
DocSearch v4.5+ از **پنل کناری Ask AI** اختیاری پشتیبانی می‌کند. وقتی فعال باشد، به طور پیش‌فرض می‌توان آن را با **Ctrl/Cmd+I** باز کرد. [مرجع API پنل کناری](https://docsearch.algolia.com/docs/sidepanel/api-reference) شامل لیست کامل گزینه‌ها است. DocSearch v4.5+ از **پنل کناری Ask AI** اختیاری پشتیبانی می‌کند. وقتی فعال باشد، به طور پیش‌فرض می‌توان آن را با **Ctrl/Cmd+I** باز کرد. [مرجع API پنل کناری](https://docsearch.algolia.com/docs/packages/sidepanel/api) شامل لیست کامل گزینه‌ها است.
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -267,9 +270,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
// آینه API @docsearch/sidepanel-js SidepanelProps // آینه API @docsearch/sidepanel-js SidepanelProps
panel: { panel: {
@ -299,9 +302,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
keyboardShortcuts: { keyboardShortcuts: {
'Ctrl/Cmd+I': false 'Ctrl/Cmd+I': false
@ -337,10 +340,9 @@ export default defineConfig({
options: { options: {
mode: 'sidePanel', mode: 'sidePanel',
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...',
sidePanel: true sidePanel: true
} }
} }

@ -204,7 +204,7 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...' indices: ['...']
} }
} }
} }
@ -222,10 +222,14 @@ export default defineConfig({
</details> </details>
詳しくは[公式 Algolia ドキュメント](https://docsearch.algolia.com/docs/api#translations)を参照してください。すぐに始めるには、このサイトで使っている翻訳を[GitHub リポジトリ](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)からコピーすることもできます。 詳しくは[公式 Algolia ドキュメント](https://docsearch.algolia.com/docs/packages/react/api-reference#translations)を参照してください。すぐに始めるには、このサイトで使っている翻訳を[GitHub リポジトリ](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)からコピーすることもできます。
### Algolia Ask AI のサポート {#ask-ai} ### Algolia Ask AI のサポート {#ask-ai}
::: note 注意
`v5.0.0` 以降、Ask AI のバックエンドは Algolia の [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) に移行しました。移行に役立つ Ask AI から Agent Studio への[移行ガイド](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio)も利用できます。
:::
**Ask AI** を有効にするには、`options` 内に `askAi` オプション(またはその一部)を指定します。 **Ask AI** を有効にするには、`options` 内に `askAi` オプション(またはその一部)を指定します。
```ts ```ts
@ -238,16 +242,15 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
// askAi: "あなたのアシスタントID" // askAi: "あなたのエージェントID"
// または // または
askAi: { askAi: {
// 最低限、Algolia から受け取った assistantId を指定する必要があります // 最低限、Algolia から受け取った agentId を指定する必要があります
assistantId: 'XXXYYY', agentId: 'XXXYYY',
// 任意の上書き — 省略した場合は上位の appId/apiKey/indexName を再利用 // 任意の上書き — 省略した場合は上位の appId/apiKey の値を再利用
// apiKey: '...', // apiKey: '...',
// appId: '...', // appId: '...',
// indexName: '...'
} }
} }
} }
@ -261,7 +264,7 @@ export default defineConfig({
### Ask AI サイドパネル {#ask-ai-side-panel} ### Ask AI サイドパネル {#ask-ai-side-panel}
DocSearch v4.5+ はオプションの **Ask AI サイドパネル**をサポートしています。有効にすると、デフォルトで **Ctrl/Cmd+I** で開くことができます。[サイドパネル API リファレンス](https://docsearch.algolia.com/docs/sidepanel/api-reference)にオプションの完全なリストがあります。 DocSearch v4.5+ はオプションの **Ask AI サイドパネル**をサポートしています。有効にすると、デフォルトで **Ctrl/Cmd+I** で開くことができます。[サイドパネル API リファレンス](https://docsearch.algolia.com/docs/packages/sidepanel/api)にオプションの完全なリストがあります。
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -273,9 +276,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
// @docsearch/sidepanel-js SidepanelProps API をミラー // @docsearch/sidepanel-js SidepanelProps API をミラー
panel: { panel: {
@ -305,9 +308,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
keyboardShortcuts: { keyboardShortcuts: {
'Ctrl/Cmd+I': false 'Ctrl/Cmd+I': false
@ -343,10 +346,9 @@ export default defineConfig({
options: { options: {
mode: 'sidePanel', mode: 'sidePanel',
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...',
sidePanel: true sidePanel: true
} }
} }

@ -198,7 +198,7 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...' indices: ['...']
} }
} }
} }
@ -216,10 +216,14 @@ export default defineConfig({
</details> </details>
자세한 내용은 [공식 Algolia 문서](https://docsearch.algolia.com/docs/api#translations)를 참고하세요. 빠르게 시작하려면 이 사이트에서 사용하는 번역을 [GitHub 저장소](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)에서 복사할 수도 있습니다. 자세한 내용은 [공식 Algolia 문서](https://docsearch.algolia.com/docs/packages/react/api-reference#translations)를 참고하세요. 빠르게 시작하려면 이 사이트에서 사용하는 번역을 [GitHub 저장소](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)에서 복사할 수도 있습니다.
### Algolia Ask AI 지원 {#ask-ai} ### Algolia Ask AI 지원 {#ask-ai}
::: note 참고
`v5.0.0`부터 Ask AI는 백엔드로 Algolia의 [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart)를 사용합니다. 전환에 도움이 되는 Ask AI -> Agent Studio [마이그레이션 가이드](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio)도 제공됩니다.
:::
**Ask AI** 기능을 사용하려면 `askAi` 옵션을 추가하세요: **Ask AI** 기능을 사용하려면 `askAi` 옵션을 추가하세요:
```ts ```ts
@ -232,16 +236,15 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
// askAi: "내-어시스턴트-ID" // askAi: "내-에이전트-ID"
// 또는 // 또는
askAi: { askAi: {
// 최소한 Algolia에서 받은 assistantId를 제공해야 합니다 // 최소한 Algolia에서 받은 agentId를 제공해야 합니다
assistantId: 'XXXYYY', agentId: 'XXXYYY',
// 선택적 재정의 — 생략하면 상위 appId/apiKey/indexName 값이 재사용됩니다 // 선택적 재정의 — 생략하면 상위 appId/apiKey 값이 재사용됩니다
// apiKey: '...', // apiKey: '...',
// appId: '...', // appId: '...',
// indexName: '...'
} }
} }
} }
@ -255,7 +258,7 @@ Ask AI를 사용하지 않으려면 `askAi` 옵션을 생략하면 됩니다.
### Ask AI 사이드 패널 {#ask-ai-side-panel} ### Ask AI 사이드 패널 {#ask-ai-side-panel}
DocSearch v4.5+는 선택적 **Ask AI 사이드 패널**을 지원합니다. 활성화되면 기본적으로 **Ctrl/Cmd+I**로 열 수 있습니다. [사이드 패널 API 참조](https://docsearch.algolia.com/docs/sidepanel/api-reference)에 전체 옵션 목록이 있습니다. DocSearch v4.5+는 선택적 **Ask AI 사이드 패널**을 지원합니다. 활성화되면 기본적으로 **Ctrl/Cmd+I**로 열 수 있습니다. [사이드 패널 API 참조](https://docsearch.algolia.com/docs/packages/sidepanel/api)에 전체 옵션 목록이 있습니다.
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -267,9 +270,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
// @docsearch/sidepanel-js SidepanelProps API 반영 // @docsearch/sidepanel-js SidepanelProps API 반영
panel: { panel: {
@ -299,9 +302,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
keyboardShortcuts: { keyboardShortcuts: {
'Ctrl/Cmd+I': false 'Ctrl/Cmd+I': false
@ -337,10 +340,9 @@ export default defineConfig({
options: { options: {
mode: 'sidePanel', mode: 'sidePanel',
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...',
sidePanel: true sidePanel: true
} }
} }

@ -198,7 +198,7 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...' indices: ['...']
} }
} }
} }
@ -216,10 +216,14 @@ Você pode usar uma configuração como esta para usar a pesquisa multilínguas:
</details> </details>
Consulte a [documentação oficial da Algolia](https://docsearch.algolia.com/docs/api#translations) para saber mais. Para começar rapidamente, você também pode copiar as traduções usadas por este site do [nosso repositório no GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). Consulte a [documentação oficial da Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations) para saber mais. Para começar rapidamente, você também pode copiar as traduções usadas por este site do [nosso repositório no GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code).
### Suporte ao Algolia Ask AI {#ask-ai} ### Suporte ao Algolia Ask AI {#ask-ai}
::: note Nota
A partir da versão `v5.0.0`, o Ask AI passou a usar o [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) da Algolia como backend. Um [guia de migração](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) do Ask AI para o Agent Studio está disponível para ajudar na transição.
:::
Se quiser incluir o **Ask AI**, adicione `askAi` em `options`: Se quiser incluir o **Ask AI**, adicione `askAi` em `options`:
```ts ```ts
@ -232,16 +236,15 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
// askAi: "SEU-ID-DO-ASSISTENTE" // askAi: "SEU-ID-DO-AGENTE"
// OU // OU
askAi: { askAi: {
// no mínimo, você deve fornecer o assistantId recebido da Algolia // no mínimo, você deve fornecer o agentId recebido da Algolia
assistantId: 'XXXYYY', agentId: 'XXXYYY',
// substituições opcionais — se omitidas, os valores appId/apiKey/indexName de nível superior são reutilizados // substituições opcionais — se omitidas, os valores appId/apiKey de nível superior são reutilizados
// apiKey: '...', // apiKey: '...',
// appId: '...', // appId: '...',
// indexName: '...'
} }
} }
} }
@ -255,7 +258,7 @@ Caso queira apenas a pesquisa por palavra-chave, omita `askAi`.
### Painel Lateral do Ask AI {#ask-ai-side-panel} ### Painel Lateral do Ask AI {#ask-ai-side-panel}
O DocSearch v4.5+ suporta um **painel lateral do Ask AI** opcional. Quando habilitado, pode ser aberto com **Ctrl/Cmd+I** por padrão. A [Referência da API do Painel Lateral](https://docsearch.algolia.com/docs/sidepanel/api-reference) contém a lista completa de opções. O DocSearch v4.5+ suporta um **painel lateral do Ask AI** opcional. Quando habilitado, pode ser aberto com **Ctrl/Cmd+I** por padrão. A [Referência da API do Painel Lateral](https://docsearch.algolia.com/docs/packages/sidepanel/api) contém a lista completa de opções.
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -267,9 +270,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
// Espelha a API do @docsearch/sidepanel-js SidepanelProps // Espelha a API do @docsearch/sidepanel-js SidepanelProps
panel: { panel: {
@ -299,9 +302,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
keyboardShortcuts: { keyboardShortcuts: {
'Ctrl/Cmd+I': false 'Ctrl/Cmd+I': false
@ -337,10 +340,9 @@ export default defineConfig({
options: { options: {
mode: 'sidePanel', mode: 'sidePanel',
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...',
sidePanel: true sidePanel: true
} }
} }

@ -204,7 +204,7 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...' indices: ['...']
} }
} }
} }
@ -222,10 +222,14 @@ export default defineConfig({
</details> </details>
Подробности см. в [официальной документации Algolia](https://docsearch.algolia.com/docs/api#translations). Чтобы быстрее начать, можно также скопировать переводы, используемые на этом сайте, из [нашего репозитория GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code). Подробности см. в [официальной документации Algolia](https://docsearch.algolia.com/docs/packages/react/api-reference#translations). Чтобы быстрее начать, можно также скопировать переводы, используемые на этом сайте, из [нашего репозитория GitHub](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code).
### Поддержка Ask AI в Algolia {#ask-ai} ### Поддержка Ask AI в Algolia {#ask-ai}
::: note Примечание
Начиная с `v5.0.0`, Ask AI использует [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) от Algolia в качестве серверной части. Для упрощения перехода доступно [руководство по миграции](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) с Ask AI на Agent Studio.
:::
Если вы хотите добавить функцию **Ask AI**, передайте параметр `askAi` (или любые из его отдельных полей) внутри объекта `options`: Если вы хотите добавить функцию **Ask AI**, передайте параметр `askAi` (или любые из его отдельных полей) внутри объекта `options`:
```ts ```ts
@ -238,16 +242,15 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
// askAi: "ВАШ-ID-АССИСТЕНТА" // askAi: "ВАШ-ID-АГЕНТА"
// ИЛИ // ИЛИ
askAi: { askAi: {
// как минимум нужно указать assistantId, полученный от Algolia // как минимум нужно указать agentId, полученный от Algolia
assistantId: 'XXXYYY', agentId: 'XXXYYY',
// необязательные переопределения — если их нет, используются значения appId/apiKey/indexName верхнего уровня // необязательные переопределения — если их нет, используются значения appId/apiKey верхнего уровня
// apiKey: '...', // apiKey: '...',
// appId: '...', // appId: '...',
// indexName: '...'
} }
} }
} }
@ -261,7 +264,7 @@ export default defineConfig({
### Боковая панель Ask AI {#ask-ai-side-panel} ### Боковая панель Ask AI {#ask-ai-side-panel}
DocSearch v4.5+ поддерживает опциональную **боковую панель Ask AI**. Когда она включена, её можно открыть с помощью **Ctrl/Cmd+I** по умолчанию. [Справочник API боковой панели](https://docsearch.algolia.com/docs/sidepanel/api-reference) содержит полный список опций. DocSearch v4.5+ поддерживает опциональную **боковую панель Ask AI**. Когда она включена, её можно открыть с помощью **Ctrl/Cmd+I** по умолчанию. [Справочник API боковой панели](https://docsearch.algolia.com/docs/packages/sidepanel/api) содержит полный список опций.
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -273,9 +276,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
panel: { panel: {
variant: 'floating', // или 'inline' variant: 'floating', // или 'inline'
@ -306,9 +309,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
keyboardShortcuts: { keyboardShortcuts: {
'Ctrl/Cmd+I': false 'Ctrl/Cmd+I': false
@ -344,10 +347,9 @@ export default defineConfig({
options: { options: {
mode: 'sidePanel', mode: 'sidePanel',
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...',
sidePanel: true sidePanel: true
} }
} }

@ -198,7 +198,7 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...' indices: ['...']
} }
} }
} }
@ -216,10 +216,14 @@ export default defineConfig({
</details> </details>
更多信息请参考[官方 Algolia 文档](https://docsearch.algolia.com/docs/api#translations)。想要快速开始,你也可以从[我们的 GitHub 仓库](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)复制此站点使用的翻译。 更多信息请参考[官方 Algolia 文档](https://docsearch.algolia.com/docs/packages/react/api-reference#translations)。想要快速开始,你也可以从[我们的 GitHub 仓库](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code)复制此站点使用的翻译。
### Algolia Ask AI 支持 {#ask-ai} ### Algolia Ask AI 支持 {#ask-ai}
::: note 注意
`v5.0.0`Ask AI 已改用 Algolia 的 [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) 作为后端。可参考 Ask AI -> Agent Studio [迁移指南](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio),以帮助完成迁移。
:::
如果需要启用 **Ask AI**,只需在 `options` 中添加 `askAi` 如果需要启用 **Ask AI**,只需在 `options` 中添加 `askAi`
```ts ```ts
@ -232,16 +236,15 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
// askAi: "你的助手ID" // askAi: "你的智能体ID"
// 或 // 或
askAi: { askAi: {
// 至少需要提供从 Algolia 获取的 assistantId // 至少需要提供从 Algolia 获取的 agentId
assistantId: 'XXXYYY', agentId: 'XXXYYY',
// 可选覆盖 — 若省略,将复用顶层 appId/apiKey/indexName 的值 // 可选覆盖 — 若省略,将复用顶层 appId/apiKey 的值
// apiKey: '...', // apiKey: '...',
// appId: '...', // appId: '...'
// indexName: '...'
} }
} }
} }
@ -255,7 +258,7 @@ export default defineConfig({
### Ask AI 侧边栏 {#ask-ai-side-panel} ### Ask AI 侧边栏 {#ask-ai-side-panel}
DocSearch v4.5+ 支持可选的 **Ask AI 侧边栏**。启用后,默认可通过 **Ctrl/Cmd+I** 打开。完整的选项列表请参阅[侧边栏 API 参考](https://docsearch.algolia.com/docs/sidepanel/api-reference)。 DocSearch v4.5+ 支持可选的 **Ask AI 侧边栏**。启用后,默认可通过 **Ctrl/Cmd+I** 打开。完整的选项列表请参阅[侧边栏 API 参考](https://docsearch.algolia.com/docs/packages/sidepanel/api)。
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -267,9 +270,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
// 镜像 @docsearch/sidepanel-js SidepanelProps API // 镜像 @docsearch/sidepanel-js SidepanelProps API
panel: { panel: {
@ -299,9 +302,9 @@ export default defineConfig({
options: { options: {
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...', indices: ['...'],
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
sidePanel: { sidePanel: {
keyboardShortcuts: { keyboardShortcuts: {
'Ctrl/Cmd+I': false 'Ctrl/Cmd+I': false
@ -337,10 +340,9 @@ export default defineConfig({
options: { options: {
mode: 'sidePanel', mode: 'sidePanel',
askAi: { askAi: {
assistantId: 'XXXYYY', agentId: 'XXXYYY',
appId: '...', appId: '...',
apiKey: '...', apiKey: '...',
indexName: '...',
sidePanel: true sidePanel: true
} }
} }

Loading…
Cancel
Save