From e26293dd2c281ef5644dd4c2b90bd5d4eff256c7 Mon Sep 17 00:00:00 2001 From: Frank Zhang <1282608+0xfrankz@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:59:12 +0800 Subject: [PATCH] refactor(Conversation): changed max tokens to 2^32-1 --- src/lib/schemas.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index e294506..011922a 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -79,7 +79,12 @@ const commonOptionsFormSchema = z.object({ message: 'Only two decimal places are supported', } ), - maxTokens: z.coerce.number().int().min(1).max(65535).optional(), + maxTokens: z.coerce + .number() + .int() + .min(1) + .max(2 ** 32 - 1) + .optional(), // n: z.coerce.number().int().min(1).max(128).optional().default(1), presencePenalty: z.coerce .number()