Update en based Algolia docs page

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

@ -204,7 +204,7 @@ export default defineConfig({
options: {
appId: '...',
apiKey: '...',
indexName: '...'
indices: ['...']
}
}
}
@ -222,10 +222,14 @@ You can use a config like this to use multilingual search:
</details>
Refer [official Algolia docs](https://docsearch.algolia.com/docs/api#translations) to learn more about them. To quickly get started, you can also copy the translations used by this site from [our GitHub repo](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code).
Refer [official Algolia docs](https://docsearch.algolia.com/docs/packages/react/api-reference#translations) to learn more about them. To quickly get started, you can also copy the translations used by this site from [our GitHub repo](https://github.com/search?q=repo:vuejs/vitepress+%22function+searchOptions%22&type=code).
### Algolia Ask AI Support {#ask-ai}
::: note Note
As of `v5.0.0`, Ask AI has now moved to using Algolia's [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio/how-to/quickstart) as it's backend. There is an Ask AI -> Agent Studio [migration guide](https://docsearch.algolia.com/docs/agent-studio/migrate-to-agent-studio) available to help with the transition.
:::
If you would like to include **Ask AI**, pass the `askAi` option (or any of the partial fields) inside `options`:
```ts
@ -238,16 +242,15 @@ export default defineConfig({
options: {
appId: '...',
apiKey: '...',
indexName: '...',
// askAi: "YOUR-ASSISTANT-ID"
indices: ['...'],
// askAi: "YOUR-AGENT-ID"
// OR
askAi: {
// at minimum you must provide the assistantId you received from Algolia
assistantId: 'XXXYYY',
// optional overrides if omitted, the top-level appId/apiKey/indexName values are reused
// at minimum you must provide the agentId you received from Algolia
agentId: 'XXXYYY',
// optional overrides if omitted, the top-level appId/apiKey values are reused
// apiKey: '...',
// appId: '...',
// indexName: '...'
}
}
}
@ -261,7 +264,7 @@ If you want to default to keyword search and do not want to use Ask AI, omit the
### Ask AI Side Panel {#ask-ai-side-panel}
DocSearch v4.5+ supports an optional **Ask AI side panel**. When enabled, it can be opened with **Ctrl/Cmd+I** by default. The [Sidepanel API Reference](https://docsearch.algolia.com/docs/sidepanel/api-reference) contains the full list of options.
DocSearch v4.5+ supports an optional **Ask AI side panel**. When enabled, it can be opened with **Ctrl/Cmd+I** by default. The [Sidepanel API Reference](https://docsearch.algolia.com/docs/packages/sidepanel/api) contains the full list of options.
```ts
import { defineConfig } from 'vitepress'
@ -273,9 +276,9 @@ export default defineConfig({
options: {
appId: '...',
apiKey: '...',
indexName: '...',
indices: ['...'],
askAi: {
assistantId: 'XXXYYY',
agentId: 'XXXYYY',
sidePanel: {
panel: {
variant: 'floating', // or 'inline'
@ -310,9 +313,9 @@ export default defineConfig({
options: {
appId: '...',
apiKey: '...',
indexName: '...',
indices: ['...'],
askAi: {
assistantId: 'XXXYYY',
agentId: 'XXXYYY',
sidePanel: {
keyboardShortcuts: {
'Ctrl/Cmd+I': false
@ -348,10 +351,9 @@ export default defineConfig({
options: {
mode: 'sidePanel',
askAi: {
assistantId: 'XXXYYY',
agentId: 'XXXYYY',
appId: '...',
apiKey: '...',
indexName: '...',
sidePanel: true
}
}

@ -7,7 +7,7 @@ export default defineConfig({
options: {
appId: '...',
apiKey: '...',
indexName: '...',
indices: ['...'],
locales: {
zh: {
translations: {
@ -33,6 +33,14 @@ export default defineConfig({
viewConversationHistoryText: '对话历史',
threadDepthErrorPlaceholder: '对话已达上限'
},
facets: {
defaultValueLabel: '全部',
facetMenuTriggerAriaLabel: '已选择',
clearAllLabel: '清除全部',
facetsAriaLabel: '搜索筛选条件',
selectedFacetsAriaLabel: '已选择的搜索筛选条件',
clearFacetAriaLabel: '清除筛选条件:'
},
newConversation: {
newConversationTitle: '我今天能帮你什么?',
newConversationDescription:
@ -72,7 +80,11 @@ export default defineConfig({
},
resultsScreen: {
askAiPlaceholder: '询问 AI',
noResultsAskAiPlaceholder: '文档里没找到?让 Ask AI 帮忙:'
noResultsAskAiPlaceholder: '文档里没找到?让 Ask AI 帮忙:',
resultsSectionTitle: '搜索结果',
askAiResultsTitle: '询问 AI 助手',
recentConversationTimestampFallback: '不久前',
resultBadgeLabelText: '类别'
},
askAiScreen: {
disclaimerText: '回答由 AI 生成,可能会出错。请核实。',
@ -89,7 +101,24 @@ export default defineConfig({
afterToolCallText: '已搜索',
stoppedStreamingText: '你已停止此回复',
errorTitleText: '聊天错误',
startNewConversationButtonText: '开始新的对话'
startNewConversationButtonText: '开始新的对话',
relatedSourcesTextPlural: '相关来源',
savedMemoryToolResultText: '已保存到记忆',
memoryToolResultText: '已使用记忆增强结果',
feedbackPanelTitle: '哪里出了问题?(可选)',
feedbackDetailsPlaceholder: '请分享更多细节...',
feedbackDisclaimerText: '反馈中将包含此对话的副本。',
feedbackSubmitButtonText: '提交',
feedbackCloseButtonTitle: '关闭',
feedbackTagIncorrect: '不正确或不完整',
feedbackTagNotWhatIAsked: '不是我想问的',
feedbackTagSlowOrBuggy: '响应缓慢或存在故障',
feedbackTagStyleOrTone: '风格或语气',
feedbackTagSafetyOrLegal: '安全或法律问题',
feedbackTagOther: '其他',
threadDepthExceededMessage:
'为确保回答准确,此对话现已关闭。',
suggestedPromptsTitleText: '推荐问题'
}
}
},
@ -115,7 +144,10 @@ export default defineConfig({
promptAskAnotherQuestionText: '再问一个问题',
promptDisclaimerText: '回答由 AI 生成,可能会出错。',
promptLabelText: '按回车发送Shift+回车换行。',
promptAriaLabelText: '问题输入'
promptAriaLabelText: '问题输入',
startNewConversationButtonText: '开始新的对话',
blockingErrorContinueText: '以继续。',
blockingErrorFallbackText: '此对话无法继续。'
},
conversationScreen: {
preToolCallText: '搜索中...',
@ -132,7 +164,22 @@ export default defineConfig({
likeButtonTitle: '喜欢',
dislikeButtonTitle: '不喜欢',
thanksForFeedbackText: '感谢你的反馈!',
errorTitleText: '聊天错误'
errorTitleText: '聊天错误',
relatedSourcesTextPlural: '相关来源',
savedMemoryToolResultText: '已保存到记忆',
memoryToolResultText: '已使用记忆增强结果',
feedbackPanelTitle: '哪里出了问题?(可选)',
feedbackDetailsPlaceholder: '请分享更多细节...',
feedbackDisclaimerText: '反馈中将包含此对话的副本。',
feedbackSubmitButtonText: '提交',
feedbackCloseButtonTitle: '关闭',
feedbackTagIncorrect: '不正确或不完整',
feedbackTagNotWhatIAsked: '不是我想问的',
feedbackTagSlowOrBuggy: '响应缓慢或存在故障',
feedbackTagStyleOrTone: '风格或语气',
feedbackTagSafetyOrLegal: '安全或法律问题',
feedbackTagOther: '其他',
suggestedPromptsTitleText: '推荐问题'
},
newConversationScreen: {
titleText: '我今天能帮你什么?',

Loading…
Cancel
Save