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

[8.17] [Bug] [Assistant API] - Do not allow empty conversation ID in chat/complete route (#11783) (#213049) #213086

Merged
merged 1 commit into from
Mar 4, 2025
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
2 changes: 1 addition & 1 deletion oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42966,7 +42966,7 @@ components:
connectorId:
type: string
conversationId:
type: string
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
isStream:
type: boolean
langSmithApiKey:
Expand Down
2 changes: 1 addition & 1 deletion oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34580,7 +34580,7 @@ components:
connectorId:
type: string
conversationId:
type: string
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
isStream:
type: boolean
langSmithApiKey:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ components:
connectorId:
type: string
conversationId:
type: string
$ref: '#/components/schemas/NonEmptyString'
isStream:
type: boolean
langSmithApiKey:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ components:
connectorId:
type: string
conversationId:
type: string
$ref: '#/components/schemas/NonEmptyString'
isStream:
type: boolean
langSmithApiKey:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

import { z } from '@kbn/zod';

import { NonEmptyString } from '../common_attributes.gen';

export type RootContext = z.infer<typeof RootContext>;
export const RootContext = z.literal('security');

Expand Down Expand Up @@ -52,7 +54,7 @@ export const ChatMessage = z.object({

export type ChatCompleteProps = z.infer<typeof ChatCompleteProps>;
export const ChatCompleteProps = z.object({
conversationId: z.string().optional(),
conversationId: NonEmptyString.optional(),
promptId: z.string().optional(),
isStream: z.boolean().optional(),
responseLanguage: z.string().optional(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ components:
type: object
properties:
conversationId:
type: string
$ref: '../common_attributes.schema.yaml#/components/schemas/NonEmptyString'
promptId:
type: string
isStream:
Expand All @@ -103,7 +103,7 @@ components:
messages:
type: array
items:
$ref: '#/components/schemas/ChatMessage'
$ref: '#/components/schemas/ChatMessage'
required:
- messages
- persist
Expand Down