ParameterPanel
A request's parameters: system instructions, temperature, top P, max output tokens, and reasoning for models that reason. Unset is the model's default.
function Basic() {
const [value, setValue] = useState<PlaygroundParameters>({ instructions });
return (
<ParameterPanel
value={value}
onValueChange={setValue}
reasoning
align="start"
trigger={
<Button size="sm" variant="secondary" leadingIcon={icons.displayOptions}>
Parameters
</Button>
}
/>
);
}import { ParameterPanel } from "@logicplanes/kaeso-ui/playground";Props
align"start" | "end" | "center" = endHow the popover lines up with its trigger.
defaultOpenbooleanWhether the popover starts open, when the component keeps its own state.
defaultsPick<PlaygroundParameters, "temperature" | "topP">What unset shows (temperature 1 and top P 1 unless given): the model's defaults.
disabledboolean = falseTurns off every parameter.
durationboolean = falseShows the length in seconds, for sound effect and music models.
imageImageParameterOptionsAn image model's options: the size, how many images per prompt (up to four shown) and its qualities.
instructionsboolean = trueShows the system instructions field (true by default).
layout"popover" | "panel" = popoverCompact inside a popover, or roomier in a side panel.
maxOutputTokensLimitnumberThe model's maximum output tokens: the field's maximum, named in a hint under it.
onOpenChange((open: boolean) => void)Called when the popover opens or closes.
onValueChange(next: PlaygroundParameters) => voidCalled with the changed parameters.
openbooleanWhether the popover is open, when you control it.
reasoningboolean | ReasoningEffort[] = falseThe reasoning efforts the model takes, or false (the default) when it doesn't reason: no effort and no summary.
samplingboolean = trueShows temperature and top P; models that reason often take neither (true by default).
side"top" | "bottom" | "left" | "right" = bottomThe side the popover opens on.
textboolean = trueShows the text parameters, such as the maximum output tokens (true by default); off when no text model is chosen.
titlestringThe popover's title, also its name. Defaults to "Parameters" in the provider's language.
translateboolean = falseShows whether a transcript is as spoken or in English, for transcription models that translate.
triggerReactElement<unknown, string | JSXElementConstructor<any>>The button that opens the parameters in a popover; without one, the parameters sit in the page.
valuePlaygroundParametersThe parameters, such as temperature and effort, image size and voice.
voicesboolean | readonly string[] = falseA speech model's voices to choose from, or true for a field that takes any voice name or id.