From 7a490ba6a7f640b8dd945399131ef4b206b88346 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:20:05 -0400 Subject: [PATCH] [8.10] [Security solution] Another GenAI response schema update (#166495) (#166498) # Backport This will backport the following commits from `main` to `8.10`: - [[Security solution] Another GenAI response schema update (#166495)](https://github.com/elastic/kibana/pull/166495) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Steph Milovic --- x-pack/plugins/stack_connectors/common/gen_ai/schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/stack_connectors/common/gen_ai/schema.ts b/x-pack/plugins/stack_connectors/common/gen_ai/schema.ts index 860976834076b..f82b89ee7c2b6 100644 --- a/x-pack/plugins/stack_connectors/common/gen_ai/schema.ts +++ b/x-pack/plugins/stack_connectors/common/gen_ai/schema.ts @@ -60,8 +60,8 @@ export const GenAiRunActionResponseSchema = schema.object( }, { unknowns: 'ignore' } ), - finish_reason: schema.string(), - index: schema.number(), + finish_reason: schema.maybe(schema.string()), + index: schema.maybe(schema.number()), }, { unknowns: 'ignore' } )