From d34aaa5cc2a8d3421b24567cb3d52ca5264a8fc0 Mon Sep 17 00:00:00 2001 From: Nico Albanese Date: Tue, 2 Jul 2024 09:23:25 +0100 Subject: [PATCH] fix: added optional flag to numberOfShares zod schema --- lib/chat/actions.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/chat/actions.tsx b/lib/chat/actions.tsx index 41e2c46..ca6de3d 100644 --- a/lib/chat/actions.tsx +++ b/lib/chat/actions.tsx @@ -310,6 +310,7 @@ async function submitUserMessage(content: string) { price: z.number().describe('The price of the stock.'), numberOfShares: z .number() + .optional() .describe( 'The **number of shares** for a stock or currency to purchase. Can be optional if the user did not specify it.' )