diff --git a/src/components/playground/ConfigSidebar.tsx b/src/components/playground/ConfigSidebar.tsx index f09d77f0..28eddbae 100644 --- a/src/components/playground/ConfigSidebar.tsx +++ b/src/components/playground/ConfigSidebar.tsx @@ -43,12 +43,16 @@ export default function ConfigSidebar({}: Props) { /> - handleUpdateConfig("max_tokens", value) - } + onChange={(value: OpenAIConfig["max_tokens"]) => { + if (value === -1) { + handleUpdateConfig("max_tokens", undefined) + } else { + handleUpdateConfig("max_tokens", value) + } + }} />