Skip to content
Merged
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
27 changes: 0 additions & 27 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61660,8 +61660,6 @@ components:
type: string
replacements:
$ref: '#/components/schemas/Security_AI_Assistant_API_Replacements'
summary:
$ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummary'
timestamp:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp'
title:
Expand All @@ -61684,29 +61682,6 @@ components:
- users
- namespace
- category
Security_AI_Assistant_API_ConversationSummary:
allOf:
- $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummaryBase'
- type: object
properties:
timestamp:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp'
description: The timestamp summary was updated.
example: '2025-04-30T16:00:00Z'
required:
- timestamp
Security_AI_Assistant_API_ConversationSummaryBase:
type: object
properties:
semanticContent:
description: Summary text of the conversation over time.
example: This conversation covered how to configure the Security AI Assistant.
type: string
summarizedMessageIds:
description: The list of summarized messages.
items:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
type: array
Security_AI_Assistant_API_ConversationUpdateProps:
type: object
properties:
Expand All @@ -61729,8 +61704,6 @@ components:
type: array
replacements:
$ref: '#/components/schemas/Security_AI_Assistant_API_Replacements'
summary:
$ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummaryBase'
title:
description: The conversation title.
example: Updated Security AI Assistant Setup
Expand Down
27 changes: 0 additions & 27 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74215,8 +74215,6 @@ components:
type: string
replacements:
$ref: '#/components/schemas/Security_AI_Assistant_API_Replacements'
summary:
$ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummary'
timestamp:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp'
title:
Expand All @@ -74239,29 +74237,6 @@ components:
- users
- namespace
- category
Security_AI_Assistant_API_ConversationSummary:
allOf:
- $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummaryBase'
- type: object
properties:
timestamp:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyTimestamp'
description: The timestamp summary was updated.
example: '2025-04-30T16:00:00Z'
required:
- timestamp
Security_AI_Assistant_API_ConversationSummaryBase:
type: object
properties:
semanticContent:
description: Summary text of the conversation over time.
example: This conversation covered how to configure the Security AI Assistant.
type: string
summarizedMessageIds:
description: The list of summarized messages.
items:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
type: array
Security_AI_Assistant_API_ConversationUpdateProps:
type: object
properties:
Expand All @@ -74284,8 +74259,6 @@ components:
type: array
replacements:
$ref: '#/components/schemas/Security_AI_Assistant_API_Replacements'
summary:
$ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummaryBase'
title:
description: The conversation title.
example: Updated Security AI Assistant Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2032,8 +2032,6 @@ components:
type: string
replacements:
$ref: '#/components/schemas/Replacements'
summary:
$ref: '#/components/schemas/ConversationSummary'
timestamp:
$ref: '#/components/schemas/NonEmptyTimestamp'
title:
Expand All @@ -2056,31 +2054,6 @@ components:
- users
- namespace
- category
ConversationSummary:
allOf:
- $ref: '#/components/schemas/ConversationSummaryBase'
- type: object
properties:
timestamp:
$ref: '#/components/schemas/NonEmptyTimestamp'
description: The timestamp summary was updated.
example: '2025-04-30T16:00:00Z'
required:
- timestamp
ConversationSummaryBase:
type: object
properties:
semanticContent:
description: Summary text of the conversation over time.
example: >-
This conversation covered how to configure the Security AI
Assistant.
type: string
summarizedMessageIds:
description: The list of summarized messages.
items:
$ref: '#/components/schemas/NonEmptyString'
type: array
ConversationUpdateProps:
type: object
properties:
Expand All @@ -2103,8 +2076,6 @@ components:
type: array
replacements:
$ref: '#/components/schemas/Replacements'
summary:
$ref: '#/components/schemas/ConversationSummaryBase'
title:
description: The conversation title.
example: Updated Security AI Assistant Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2032,8 +2032,6 @@ components:
type: string
replacements:
$ref: '#/components/schemas/Replacements'
summary:
$ref: '#/components/schemas/ConversationSummary'
timestamp:
$ref: '#/components/schemas/NonEmptyTimestamp'
title:
Expand All @@ -2056,31 +2054,6 @@ components:
- users
- namespace
- category
ConversationSummary:
allOf:
- $ref: '#/components/schemas/ConversationSummaryBase'
- type: object
properties:
timestamp:
$ref: '#/components/schemas/NonEmptyTimestamp'
description: The timestamp summary was updated.
example: '2025-04-30T16:00:00Z'
required:
- timestamp
ConversationSummaryBase:
type: object
properties:
semanticContent:
description: Summary text of the conversation over time.
example: >-
This conversation covered how to configure the Security AI
Assistant.
type: string
summarizedMessageIds:
description: The list of summarized messages.
items:
$ref: '#/components/schemas/NonEmptyString'
type: array
ConversationUpdateProps:
type: object
properties:
Expand All @@ -2103,8 +2076,6 @@ components:
type: array
replacements:
$ref: '#/components/schemas/Replacements'
summary:
$ref: '#/components/schemas/ConversationSummaryBase'
title:
description: The conversation title.
example: Updated Security AI Assistant Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,6 @@ export const ConversationCategory = z.enum(['assistant', 'insights']);
export type ConversationCategoryEnum = typeof ConversationCategory.enum;
export const ConversationCategoryEnum = ConversationCategory.enum;

/**
* The conversation confidence.
*/
export type ConversationConfidence = z.infer<typeof ConversationConfidence>;
export const ConversationConfidence = z.enum(['low', 'medium', 'high']);
export type ConversationConfidenceEnum = typeof ConversationConfidence.enum;
export const ConversationConfidenceEnum = ConversationConfidence.enum;

/**
* AI assistant conversation message.
*/
Expand Down Expand Up @@ -306,28 +298,6 @@ export const ApiConfig = z.object({
model: z.string().optional(),
});

export type ConversationSummaryBase = z.infer<typeof ConversationSummaryBase>;
export const ConversationSummaryBase = z.object({
/**
* Summary text of the conversation over time.
*/
semanticContent: z.string().optional(),
/**
* The list of summarized messages.
*/
summarizedMessageIds: z.array(NonEmptyString).optional(),
});

export type ConversationSummary = z.infer<typeof ConversationSummary>;
export const ConversationSummary = ConversationSummaryBase.merge(
z.object({
/**
* The timestamp summary was updated.
*/
timestamp: NonEmptyTimestamp,
})
);

export type ErrorSchema = z.infer<typeof ErrorSchema>;
export const ErrorSchema = z
.object({
Expand All @@ -350,7 +320,6 @@ export const ConversationResponse = z.object({
* The conversation category.
*/
category: ConversationCategory,
summary: ConversationSummary.optional(),
timestamp: NonEmptyTimestamp.optional(),
/**
* The last time conversation was updated.
Expand Down Expand Up @@ -403,7 +372,6 @@ export const ConversationUpdateProps = z.object({
* LLM API configuration.
*/
apiConfig: ApiConfig.optional(),
summary: ConversationSummaryBase.optional(),
/**
* Exclude from last conversation storage.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,6 @@ components:
- insights
example: 'assistant'

ConversationConfidence:
type: string
description: The conversation confidence.
enum:
- low
- medium
- high
example: 'high'

Message:
type: object
description: AI assistant conversation message.
Expand Down Expand Up @@ -312,31 +303,6 @@ components:
description: Model
example: 'gpt-4'

ConversationSummaryBase:
type: object
properties:
semanticContent:
type: string
description: Summary text of the conversation over time.
example: 'This conversation covered how to configure the Security AI Assistant.'
summarizedMessageIds:
type: array
description: The list of summarized messages.
items:
$ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString'

ConversationSummary:
allOf:
- $ref: '#/components/schemas/ConversationSummaryBase'
- type: object
required:
- timestamp
properties:
timestamp:
$ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyTimestamp'
description: The timestamp summary was updated.
example: '2025-04-30T16:00:00Z'

ErrorSchema:
type: object
required:
Expand Down Expand Up @@ -380,8 +346,6 @@ components:
$ref: '#/components/schemas/ConversationCategory'
description: The conversation category.
example: 'assistant'
summary:
$ref: '#/components/schemas/ConversationSummary'
timestamp:
$ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyTimestamp'
updatedAt:
Expand Down Expand Up @@ -440,8 +404,6 @@ components:
apiConfig:
$ref: '#/components/schemas/ApiConfig'
description: LLM API configuration.
summary:
$ref: '#/components/schemas/ConversationSummaryBase'
excludeFromLastConversationStorage:
description: Exclude from last conversation storage.
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type {
ConversationResponse,
DeleteAllConversationsRequestBody,
ConversationUpdateProps,
ConversationSummary,
} from '@kbn/elastic-assistant-common';
import type {
CreateMessageSchema,
Expand Down Expand Up @@ -100,7 +99,7 @@ export const getDeleteAllConversationsSchemaMock = (): DeleteAllConversationsReq

export const getUpdateConversationSchemaMock = (
conversationId = 'conversation-1'
): ConversationUpdateProps & { summary?: ConversationSummary } => ({
): ConversationUpdateProps => ({
title: 'Welcome 2',
apiConfig: {
actionTypeId: '.gen-ai',
Expand Down Expand Up @@ -138,9 +137,7 @@ export const getAppendConversationMessagesSchemaMock =
],
});

export type ConversationMockParams = (ConversationCreateProps | ConversationUpdateProps) & {
summary?: ConversationSummary;
};
export type ConversationMockParams = ConversationCreateProps | ConversationUpdateProps;

export const getConversationMock = (params: ConversationMockParams): ConversationResponse => ({
id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd',
Expand Down
Loading