From 616cd2e39b2defea797edf5003c054e6f6faa847 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 28 Oct 2024 15:58:17 -0700 Subject: [PATCH] update back to enum --- .../void/src/webviews/common/contextForConfig.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/extensions/void/src/webviews/common/contextForConfig.tsx b/extensions/void/src/webviews/common/contextForConfig.tsx index 06c33781..b535d588 100644 --- a/extensions/void/src/webviews/common/contextForConfig.tsx +++ b/extensions/void/src/webviews/common/contextForConfig.tsx @@ -46,8 +46,16 @@ const voidConfigInfo: Record< configFields, ), - maxTokens: configString( - "Max number of tokens to output. Must be a number.", '' + maxTokens: configEnum( + "Max number of tokens to output.", + '1024', + [ + "default", // this will be parseInt'd into NaN and ignored by the API. Anything that's not a number has this behavior. + "1024", + "2048", + "4096", + "8192" + ] as const, ), },