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.

View source
import { ParameterPanel } from "@logicplanes/kaeso-ui/playground";

Props

  • align
    "start" | "end" | "center" = end

    How the popover lines up with its trigger.

  • defaultOpen
    boolean

    Whether the popover starts open, when the component keeps its own state.

  • defaults
    Pick<PlaygroundParameters, "temperature" | "topP">

    What unset shows (temperature 1 and top P 1 unless given): the model's defaults.

  • disabled
    boolean = false

    Turns off every parameter.

  • duration
    boolean = false

    Shows the length in seconds, for sound effect and music models.

  • image
    ImageParameterOptions

    An image model's options: the size, how many images per prompt (up to four shown) and its qualities.

  • instructions
    boolean = true

    Shows the system instructions field (true by default).

  • layout
    "popover" | "panel" = popover

    Compact inside a popover, or roomier in a side panel.

  • maxOutputTokensLimit
    number

    The 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) => void

    Called with the changed parameters.

  • open
    boolean

    Whether the popover is open, when you control it.

  • reasoning
    boolean | ReasoningEffort[] = false

    The reasoning efforts the model takes, or false (the default) when it doesn't reason: no effort and no summary.

  • sampling
    boolean = true

    Shows temperature and top P; models that reason often take neither (true by default).

  • side
    "top" | "bottom" | "left" | "right" = bottom

    The side the popover opens on.

  • text
    boolean = true

    Shows the text parameters, such as the maximum output tokens (true by default); off when no text model is chosen.

  • title
    string

    The popover's title, also its name. Defaults to "Parameters" in the provider's language.

  • translate
    boolean = false

    Shows whether a transcript is as spoken or in English, for transcription models that translate.

  • trigger
    ReactElement<unknown, string | JSXElementConstructor<any>>

    The button that opens the parameters in a popover; without one, the parameters sit in the page.

  • value
    PlaygroundParameters

    The parameters, such as temperature and effort, image size and voice.

  • voices
    boolean | readonly string[] = false

    A speech model's voices to choose from, or true for a field that takes any voice name or id.