Skip to content

Commit

Permalink
Merge branch '8.16' into backport/8.16/commit-7458ff11
Browse files Browse the repository at this point in the history
  • Loading branch information
smith authored Oct 30, 2024
2 parents de435f1 + 0f3a0af commit d1a4d2d
Show file tree
Hide file tree
Showing 181 changed files with 1,722 additions and 1,201 deletions.
15 changes: 12 additions & 3 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ xpack.observability.enabled: false
xpack.securitySolution.enabled: false
xpack.serverless.observability.enabled: false
enterpriseSearch.enabled: false
xpack.fleet.enabled: false
xpack.observabilityAIAssistant.enabled: false
xpack.osquery.enabled: false

## Fine-tune the search solution feature privileges. Also, refer to `serverless.yml` for the project-agnostic overrides.
Expand Down Expand Up @@ -88,4 +86,15 @@ xpack.searchInferenceEndpoints.ui.enabled: false
xpack.search.notebooks.catalog.url: https://elastic-enterprise-search.s3.us-east-2.amazonaws.com/serverless/catalog.json

# Semantic text UI
xpack.index_management.dev.enableSemanticText: false
xpack.index_management.dev.enableSemanticText: true

# AI Assistant config
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
xpack.observabilityAiAssistantManagement.visibilityEnabled: false
1 change: 1 addition & 0 deletions config/serverless.oblt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ xpack.apm.featureFlags.storageExplorerAvailable: false

## Set the AI Assistant type
aiAssistantManagementSelection.preferredAIAssistantType: "observability"
xpack.observabilityAIAssistant.scope: "observability"

# Specify in telemetry the project type
telemetry.labels.serverless: observability
Expand Down
4 changes: 2 additions & 2 deletions docs/management/action-types.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ a| <<gemini-action-type,{gemini}>>

| Send a request to {gemini}.

a| <<inference-action-type,{inference}>>
a| <<inference-action-type,{infer}>>

| Send a request to {inference}.
| Send a request to {infer}.

a| <<email-action-type,Email>>

Expand Down
3 changes: 0 additions & 3 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,6 @@ the minimum and maximum values of a numeric field or a map of a geo field.
[[discover:showMultiFields]]`discover:showMultiFields`::
Controls the display of multi-fields in the expanded document view.

[[discover:showLegacyFieldTopValues]]`discover:showLegacyFieldTopValues`::
To calculate the top values for a field in the sidebar using 500 instead of 5,000 records per shard, turn on this option.

[[discover-sort-defaultorder]]`discover:sort:defaultOrder`::
The default sort direction for time-based data views.

Expand Down
32 changes: 24 additions & 8 deletions docs/management/connectors/action-types/inference.asciidoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[[inference-action-type]]
== {infer-cap} connector and action
++++
<titleabbrev>{inference}</titleabbrev>
<titleabbrev>{infer-cap}</titleabbrev>
++++
:frontmatter-description: Add a connector that can send requests to {inference}.
:frontmatter-tags-products: [kibana]
:frontmatter-tags-content-type: [how-to]
:frontmatter-tags-user-goals: [configure]


The {infer} connector uses the {es} client to send requests to an {infer} service. The connector uses the <<execute-connector-api,run connector API>> to send the request.
The {infer} connector uses the {es} client to send requests to an {infer} service.
The connector uses the <<execute-connector-api,run connector API>> to send the request.

[float]
[[define-inference-ui]]
Expand All @@ -19,7 +20,7 @@ You can create connectors in *{stack-manage-app} > {connectors-ui}*. For example

[role="screenshot"]
image::management/connectors/images/inference-connector.png[{inference} connector]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.


[float]
[[inference-connector-configuration]]
Expand All @@ -44,7 +45,8 @@ while creating or editing the connector in {kib}. For example:

[role="screenshot"]
image::management/connectors/images/inference-completion-params.png[{infer} params test]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.


[float]
[[inference-connector-actions]]
=== {infer-cap} connector actions
Expand All @@ -56,33 +58,40 @@ The {infer} actions have the following configuration properties. Properties depe
==== Completion

The following example performs a completion task on the example question.

Input::
The text on which you want to perform the {infer} task. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: 'What is Elastic?'
}
------------------------------------------------------------
--

[float]
[[inference-connector-perform-text-embedding]]
==== Text embedding

The following example performs a text embedding task.

Input::
The text on which you want to perform the {infer} task. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: 'The sky above the port was the color of television tuned to a dead channel.',
task_settings: {
input_type: 'ingest'
}
}
------------------------------------------------------------
--

Input type::
An optional string that overwrites the connector's default model.

Expand All @@ -91,16 +100,20 @@ An optional string that overwrites the connector's default model.
==== Reranking

The following example performs a reranking task on the example input.

Input::
The text on which you want to perform the {infer} task. Should be a string array. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: ['luke', 'like', 'leia', 'chewy', 'r2d2', 'star', 'wars'],
query: 'star wars main character'
}
------------------------------------------------------------
--

Query::
The search query text.

Expand All @@ -109,14 +122,17 @@ The search query text.
==== Sparse embedding

The following example performs a sparse embedding task on the example sentence.

Input::
The text on which you want to perform the {infer} task. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: 'The sky above the port was the color of television tuned to a dead channel.'
}
------------------------------------------------------------
--

[float]
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-management/settings/setting_ids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export const DISCOVER_SAMPLE_SIZE_ID = 'discover:sampleSize';
export const DISCOVER_SEARCH_FIELDS_FROM_SOURCE_ID = 'discover:searchFieldsFromSource';
export const DISCOVER_SEARCH_ON_PAGE_LOAD_ID = 'discover:searchOnPageLoad';
export const DISCOVER_SHOW_FIELD_STATISTICS_ID = 'discover:showFieldStatistics';
export const DISCOVER_SHOW_LEGACY_FIELD_TOP_VALUES_ID = 'discover:showLegacyFieldTopValues';
export const DISCOVER_SHOW_MULTI_FIELDS_ID = 'discover:showMultiFields';
export const DISCOVER_SORT_DEFAULT_ORDER_ID = 'discover:sort:defaultOrder';
export const DOC_TABLE_HIDE_TIME_COLUMNS_ID = 'doc_table:hideTimeColumn';
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/tasks/os_packages/docker_generator/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function runDockerGenerator(
*/
if (flags.baseImage === 'wolfi')
baseImageName =
'docker.elastic.co/wolfi/chainguard-base:latest@sha256:18153942f0d6e97bc6131cd557c7ed3be6e892846a5df0760896eb8d15b1b236';
'docker.elastic.co/wolfi/chainguard-base:latest@sha256:8cff240b81057968575dd28dab0c3609657cb7e0e60ff017261e5b721fad9e1b';

let imageFlavor = '';
if (flags.baseImage === 'ubi') imageFlavor += `-ubi`;
Expand Down
3 changes: 3 additions & 0 deletions test/plugin_functional/test_suites/core_plugins/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
'xpack.observability_onboarding.ui.enabled (boolean?)',
'xpack.observabilityLogsExplorer.navigation.showAppLink (boolean?|never)',
'xpack.observabilityAIAssistant.scope (observability?|search?)',
'xpack.observabilityAiAssistantManagement.logSourcesEnabled (boolean?)',
'xpack.observabilityAiAssistantManagement.spacesEnabled (boolean?)',
'xpack.observabilityAiAssistantManagement.visibilityEnabled (boolean?)',
'share.new_version.enabled (boolean?)',
'aiAssistantManagementSelection.preferredAIAssistantType (default?|never?|observability?)',
/**
Expand Down
24 changes: 15 additions & 9 deletions x-pack/packages/kbn-ai-assistant/src/chat/chat_actions_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
import { ConnectorSelectorBase } from '@kbn/observability-ai-assistant-plugin/public';
import type { UseGenAIConnectorsResult } from '../hooks/use_genai_connectors';
import { useKibana } from '../hooks/use_kibana';
import { useKnowledgeBase } from '../hooks';

export function ChatActionsMenu({
connectors,
Expand All @@ -31,6 +32,7 @@ export function ChatActionsMenu({
onCopyConversationClick: () => void;
}) {
const { application, http } = useKibana().services;
const knowledgeBase = useKnowledgeBase();
const [isOpen, setIsOpen] = useState(false);

const handleNavigateToConnectors = () => {
Expand Down Expand Up @@ -91,15 +93,19 @@ export function ChatActionsMenu({
defaultMessage: 'Actions',
}),
items: [
{
name: i18n.translate('xpack.aiAssistant.chatHeader.actions.knowledgeBase', {
defaultMessage: 'Manage knowledge base',
}),
onClick: () => {
toggleActionsMenu();
handleNavigateToSettingsKnowledgeBase();
},
},
...(knowledgeBase?.status.value?.enabled
? [
{
name: i18n.translate('xpack.aiAssistant.chatHeader.actions.knowledgeBase', {
defaultMessage: 'Manage knowledge base',
}),
onClick: () => {
toggleActionsMenu();
handleNavigateToSettingsKnowledgeBase();
},
},
]
: []),
{
name: i18n.translate('xpack.aiAssistant.chatHeader.actions.settings', {
defaultMessage: 'AI Assistant Settings',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const defaultProps: ComponentStoryObj<typeof Component> = {
loading: false,
value: {
ready: true,
enabled: true,
},
refresh: () => {},
},
Expand Down
2 changes: 1 addition & 1 deletion x-pack/packages/kbn-ai-assistant/src/chat/chat_body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function ChatBody({
showLinkToConversationsApp: boolean;
onConversationUpdate: (conversation: { conversation: Conversation['conversation'] }) => void;
onToggleFlyoutPositionMode?: (flyoutPositionMode: FlyoutPositionMode) => void;
navigateToConversation: (conversationId?: string) => void;
navigateToConversation?: (conversationId?: string) => void;
}) {
const license = useLicense();
const hasCorrectLicense = license?.hasAtLeast('enterprise');
Expand Down
14 changes: 9 additions & 5 deletions x-pack/packages/kbn-ai-assistant/src/chat/chat_flyout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function ChatFlyout({
initialFlyoutPositionMode?: FlyoutPositionMode;
isOpen: boolean;
onClose: () => void;
navigateToConversation(conversationId?: string): void;
navigateToConversation?: (conversationId?: string) => void;
}) {
const { euiTheme } = useEuiTheme();
const breakpoint = useCurrentEuiBreakpoint();
Expand Down Expand Up @@ -272,10 +272,14 @@ export function ChatFlyout({
conversationList.conversations.refresh();
}}
onToggleFlyoutPositionMode={handleToggleFlyoutPositionMode}
navigateToConversation={(newConversationId?: string) => {
if (onClose) onClose();
navigateToConversation(newConversationId);
}}
navigateToConversation={
navigateToConversation
? (newConversationId?: string) => {
if (onClose) onClose();
navigateToConversation(newConversationId);
}
: undefined
}
/>
</EuiFlexItem>

Expand Down
49 changes: 25 additions & 24 deletions x-pack/packages/kbn-ai-assistant/src/chat/chat_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function ChatHeader({
onCopyConversation: () => void;
onSaveTitle: (title: string) => void;
onToggleFlyoutPositionMode?: (newFlyoutPositionMode: FlyoutPositionMode) => void;
navigateToConversation: (nextConversationId?: string) => void;
navigateToConversation?: (nextConversationId?: string) => void;
}) {
const theme = useEuiTheme();
const breakpoint = useCurrentEuiBreakpoint();
Expand Down Expand Up @@ -164,31 +164,32 @@ export function ChatHeader({
}
/>
</EuiFlexItem>

<EuiFlexItem grow={false}>
<EuiPopover
anchorPosition="downLeft"
button={
<EuiToolTip
content={i18n.translate(
'xpack.aiAssistant.chatHeader.euiToolTip.navigateToConversationsLabel',
{ defaultMessage: 'Navigate to conversations' }
)}
display="block"
>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.aiAssistant.chatHeader.euiButtonIcon.navigateToConversationsLabel',
{navigateToConversation ? (
<EuiFlexItem grow={false}>
<EuiPopover
anchorPosition="downLeft"
button={
<EuiToolTip
content={i18n.translate(
'xpack.aiAssistant.chatHeader.euiToolTip.navigateToConversationsLabel',
{ defaultMessage: 'Navigate to conversations' }
)}
data-test-subj="observabilityAiAssistantChatHeaderButton"
iconType="discuss"
onClick={() => navigateToConversation(conversationId)}
/>
</EuiToolTip>
}
/>
</EuiFlexItem>
display="block"
>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.aiAssistant.chatHeader.euiButtonIcon.navigateToConversationsLabel',
{ defaultMessage: 'Navigate to conversations' }
)}
data-test-subj="observabilityAiAssistantChatHeaderButton"
iconType="discuss"
onClick={() => navigateToConversation(conversationId)}
/>
</EuiToolTip>
}
/>
</EuiFlexItem>
) : null}
</>
) : null}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const defaultProps: ComponentProps<typeof Component> = {
loading: false,
value: {
ready: true,
enabled: true,
},
refresh: () => {},
},
Expand Down
Loading

0 comments on commit d1a4d2d

Please sign in to comment.