fix: added optional flag to numberOfShares zod schema

This commit is contained in:
Nico Albanese 2024-07-02 09:23:25 +01:00
parent 16ec61a877
commit d34aaa5cc2

View file

@ -310,6 +310,7 @@ async function submitUserMessage(content: string) {
price: z.number().describe('The price of the stock.'), price: z.number().describe('The price of the stock.'),
numberOfShares: z numberOfShares: z
.number() .number()
.optional()
.describe( .describe(
'The **number of shares** for a stock or currency to purchase. Can be optional if the user did not specify it.' 'The **number of shares** for a stock or currency to purchase. Can be optional if the user did not specify it.'
) )