setIsPopoverOpen(!isPopoverOpen)}
+ {
+ // not currently installing
+ // and has an inference install error (timeout, etc) or model is not ready
+ // this state is when the user has a preconfigured connector and we prompt to install
+ // or there was a problem deploying the model
+ !isInstalling ? (
+ knowledgeBase.installError || !modelIsReady ? (
+ <>
+
+ {i18n.translate(
+ 'xpack.aiAssistant.welcomeMessageKnowledgeBase.yourKnowledgeBaseIsNotSetUpCorrectlyLabel',
+ { defaultMessage: `Your Knowledge base hasn't been set up.` }
+ )}
+
+
+
+
+
+
+
+
- {i18n.translate(
- 'xpack.aiAssistant.welcomeMessage.inspectErrorsButtonEmptyLabel',
- { defaultMessage: 'Inspect issues' }
- )}
-
- }
- isOpen={isPopoverOpen}
- panelPaddingSize="none"
- closePopover={handleClosePopover}
- >
-
-
-
-
-
-
- >
+ {i18n.translate('xpack.aiAssistant.welcomeMessage.retryButtonLabel', {
+ defaultMessage: 'Install Knowledge base',
+ })}
+
+
+
+
+
+ setIsPopoverOpen(!isPopoverOpen)}
+ >
+ {i18n.translate(
+ 'xpack.aiAssistant.welcomeMessage.inspectErrorsButtonEmptyLabel',
+ { defaultMessage: 'Inspect issues' }
+ )}
+
+ }
+ isOpen={isPopoverOpen}
+ panelPaddingSize="none"
+ closePopover={handleClosePopover}
+ >
+
+
+
+
+
+
+ >
+ ) : null
) : null
- ) : null}
+ }
{showHasBeenInstalled ? (
diff --git a/x-pack/platform/packages/shared/kbn-ai-assistant/src/hooks/use_knowledge_base.tsx b/x-pack/platform/packages/shared/kbn-ai-assistant/src/hooks/use_knowledge_base.tsx
index a9feb325e6d6c..5ab4193d6ad48 100644
--- a/x-pack/platform/packages/shared/kbn-ai-assistant/src/hooks/use_knowledge_base.tsx
+++ b/x-pack/platform/packages/shared/kbn-ai-assistant/src/hooks/use_knowledge_base.tsx
@@ -62,8 +62,8 @@ export function useKnowledgeBase(): UseKnowledgeBaseResult {
}
setInstallError(error);
notifications!.toasts.addError(error, {
- title: i18n.translate('xpack.aiAssistant.errorSettingUpKnowledgeBase', {
- defaultMessage: 'Could not set up Knowledge Base',
+ title: i18n.translate('xpack.aiAssistant.errorSettingUpInferenceEndpoint', {
+ defaultMessage: 'Could not create inference endpoint',
}),
});
})
diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json
index 49d99cf45d346..d51588efc972e 100644
--- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json
+++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json
@@ -9793,7 +9793,6 @@
"xpack.aiAssistant.couldNotFindConversationTitle": "Conversation introuvable",
"xpack.aiAssistant.disclaimer.disclaimerLabel": "Ce chat est soutenu par une intégration avec votre fournisseur LLM. Il arrive que les grands modèles de langage (LLM) présentent comme correctes des informations incorrectes. Elastic prend en charge la configuration ainsi que la connexion au fournisseur LLM et à votre base de connaissances, mais n'est pas responsable des réponses fournies par le LLM.",
"xpack.aiAssistant.emptyConversationTitle": "Nouvelle conversation",
- "xpack.aiAssistant.errorSettingUpKnowledgeBase": "Impossible de configurer la base de connaissances",
"xpack.aiAssistant.errorUpdatingConversation": "Impossible de mettre à jour la conversation",
"xpack.aiAssistant.executedFunctionFailureEvent": "impossible d'exécuter la fonction {functionName}",
"xpack.aiAssistant.failedToGetStatus": "Échec de l'obtention du statut du modèle.",
diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json
index 563b5f13dd00b..a7a455d45def3 100644
--- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json
+++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json
@@ -9669,7 +9669,6 @@
"xpack.aiAssistant.couldNotFindConversationTitle": "会話が見つかりません",
"xpack.aiAssistant.disclaimer.disclaimerLabel": "このチャットは、LLMプロバイダーとの統合によって提供されています。LLMは、正しくない情報を正しい情報であるかのように表示する場合があることが知られています。Elasticは、構成やLLMプロバイダーへの接続、お客様のナレッジベースへの接続はサポートしますが、LLMの応答については責任を負いません。",
"xpack.aiAssistant.emptyConversationTitle": "新しい会話",
- "xpack.aiAssistant.errorSettingUpKnowledgeBase": "ナレッジベースをセットアップできませんでした",
"xpack.aiAssistant.errorUpdatingConversation": "会話を更新できませんでした",
"xpack.aiAssistant.executedFunctionFailureEvent": "関数{functionName}の実行に失敗しました",
"xpack.aiAssistant.failedToGetStatus": "モデルステータスを取得できませんでした。",
diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json
index 42d027dcacfb4..1da3528eebbdd 100644
--- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json
+++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json
@@ -9511,7 +9511,6 @@
"xpack.aiAssistant.couldNotFindConversationTitle": "未找到对话",
"xpack.aiAssistant.disclaimer.disclaimerLabel": "通过集成 LLM 提供商来支持此聊天。众所周知,LLM 有时会提供错误信息,好像它是正确的。Elastic 支持配置并连接到 LLM 提供商和知识库,但不对 LLM 响应负责。",
"xpack.aiAssistant.emptyConversationTitle": "新对话",
- "xpack.aiAssistant.errorSettingUpKnowledgeBase": "无法设置知识库",
"xpack.aiAssistant.errorUpdatingConversation": "无法更新对话",
"xpack.aiAssistant.executedFunctionFailureEvent": "无法执行函数 {functionName}",
"xpack.aiAssistant.failedToGetStatus": "无法获取模型状态。",
diff --git a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts
index 6aa63c177c746..ddc644c4b6d7c 100644
--- a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts
+++ b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts
@@ -13,6 +13,7 @@ import {
InferenceInferenceEndpointInfo,
MlDeploymentAllocationState,
MlDeploymentAssignmentState,
+ MlTrainedModelDeploymentAllocationStatus,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import moment from 'moment';
import { createObservabilityAIAssistantServerRoute } from '../create_observability_ai_assistant_server_route';
@@ -34,8 +35,9 @@ const getKnowledgeBaseStatus = createObservabilityAIAssistantServerRoute({
enabled: boolean;
endpoint?: Partial;
model_stats?: {
- deployment_state: MlDeploymentAssignmentState | undefined;
- allocation_state: MlDeploymentAllocationState | undefined;
+ deployment_state?: MlDeploymentAssignmentState;
+ allocation_state?: MlDeploymentAllocationState;
+ allocation_count?: MlTrainedModelDeploymentAllocationStatus['allocation_count'];
};
}> => {
const client = await service.getClient({ request });