From 345bfac51993071257f7905d31eff55ca612396d Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Wed, 6 Nov 2024 08:34:07 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Update=20generateVariable=20extr?= =?UTF-8?q?action=20to=20use=20nullish=20instead=20of=20optional=20to=20no?= =?UTF-8?q?t=20throw=20on=20null=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/forge/blocks/openai/src/shared/runGenerateVariables.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forge/blocks/openai/src/shared/runGenerateVariables.ts b/packages/forge/blocks/openai/src/shared/runGenerateVariables.ts index e5a54a5e55..d59a624729 100644 --- a/packages/forge/blocks/openai/src/shared/runGenerateVariables.ts +++ b/packages/forge/blocks/openai/src/shared/runGenerateVariables.ts @@ -89,7 +89,7 @@ const convertVariablesToExtractToSchema = ({ } } if (variableToExtract.isRequired === false) - shape[matchingVariable.name] = shape[matchingVariable.name]!.optional(); + shape[matchingVariable.name] = shape[matchingVariable.name]!.nullish(); if (isNotEmpty(variableToExtract.description)) shape[matchingVariable.name] = shape[matchingVariable.name]!.describe(