Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ES3] Enable AI assistant knowledge base #202210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ xpack.features.overrides:
stackAlerts:
name: "Alerts"
category: "enterpriseSearch"
### Observability AI Assistant feature is moved to Search and renamed
observabilityAIAssistant:
name: "AI Assistant"
category: "enterpriseSearch"
### AI Assistant enables the Inventory feature, moving to Search
inventory:
category: "enterpriseSearch"

## Cloud settings
xpack.cloud.serverless.project_type: search
Expand Down Expand Up @@ -127,7 +134,6 @@ xpack.observabilityAIAssistant.enabled: true
xpack.searchAssistant.enabled: true
xpack.searchAssistant.ui.enabled: true
xpack.observabilityAIAssistant.scope: "search"
xpack.observabilityAIAssistant.enableKnowledgeBase: false
aiAssistantManagementSelection.preferredAIAssistantType: "observability"
xpack.observabilityAiAssistantManagement.logSourcesEnabled: false
xpack.observabilityAiAssistantManagement.spacesEnabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const installElser = async ({
inference_config: {
service: 'elasticsearch',
service_settings: {
num_allocations: 1,
adaptive_allocations: { enabled: true },
num_threads: 1,
model_id: '.elser_model_2',
},
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/search_assistant/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export class SearchAssistantPlugin
pluginsStart,
});
const isEnabled = appService.isEnabled();
const aiAssistantIsEnabled = coreStart.application.capabilities.observabilityAIAssistant?.show;

if (!isEnabled) {
if (!isEnabled || !aiAssistantIsEnabled) {
return {};
}

Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/search_playground/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"actions",
"data",
"encryptedSavedObjects",
"ml",
"navigation",
"share",
"security",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/serverless_observability/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class ServerlessObservabilityPlugin
observabilityAiAssistantManagement: {
category: appCategories.OTHER,
title: i18n.translate('xpack.serverlessObservability.aiAssistantManagementTitle', {
defaultMessage: 'AI Assistant for Observability and Search Settings',
defaultMessage: 'AI Assistant Settings',
}),
description: i18n.translate(
'xpack.serverlessObservability.aiAssistantManagementDescription',
Expand Down
23 changes: 21 additions & 2 deletions x-pack/plugins/serverless_search/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Plugin,
} from '@kbn/core/public';
import { i18n } from '@kbn/i18n';
import { appIds } from '@kbn/management-cards-navigation';
import { appCategories, appIds } from '@kbn/management-cards-navigation';
import { AuthenticatedUser } from '@kbn/security-plugin/common';
import { QueryClient, MutationCache, QueryCache } from '@tanstack/react-query';
import { of } from 'rxjs';
Expand Down Expand Up @@ -168,12 +168,31 @@ export class ServerlessSearchPlugin
): ServerlessSearchPluginStart {
const { serverless, management, indexManagement, security } = services;
serverless.setProjectHome(services.searchIndices.startRoute);
const aiAssistantIsEnabled = core.application.capabilities.observabilityAIAssistant?.show;

const navigationTree$ = of(navigationTree(core.application));
serverless.initNavigation('es', navigationTree$, { dataTestSubj: 'svlSearchSideNav' });

const extendCardNavDefinitions = serverless.getNavigationCards(
security.authz.isRoleManagementEnabled()
security.authz.isRoleManagementEnabled(),
aiAssistantIsEnabled
? {
observabilityAiAssistantManagement: {
category: appCategories.OTHER,
title: i18n.translate('xpack.serverlessSearch.aiAssistantManagementTitle', {
defaultMessage: 'AI Assistant Settings',
}),
description: i18n.translate(
'xpack.serverlessObservability.aiAssistantManagementDescription',
{
defaultMessage:
'Manage knowledge base and control assistant behavior, including response language.',
}
),
icon: 'sparkles',
},
}
: undefined
);

management.setupCardsNavigation({
Expand Down