MaxLengthSelector() — ui Function Reference
Architecture documentation for the MaxLengthSelector() function in maxlength-selector.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD bc75e407_1aa1_9417_6f93_ae3401fbb0b6["MaxLengthSelector()"] d7dd18a6_6346_bd22_da4f_8310ad6201b3["maxlength-selector.tsx"] bc75e407_1aa1_9417_6f93_ae3401fbb0b6 -->|defined in| d7dd18a6_6346_bd22_da4f_8310ad6201b3 style bc75e407_1aa1_9417_6f93_ae3401fbb0b6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/app/(app)/examples/playground/components/maxlength-selector.tsx lines 20–56
export function MaxLengthSelector({ defaultValue }: MaxLengthSelectorProps) {
const [value, setValue] = React.useState(defaultValue)
return (
<div className="grid gap-2 pt-2">
<HoverCard openDelay={200}>
<HoverCardTrigger asChild>
<div className="grid gap-4">
<div className="flex items-center justify-between">
<Label htmlFor="maxlength">Maximum Length</Label>
<span className="text-muted-foreground hover:border-border w-12 rounded-md border border-transparent px-2 py-0.5 text-right text-sm">
{value}
</span>
</div>
<Slider
id="maxlength"
max={4000}
defaultValue={value}
step={10}
onValueChange={setValue}
aria-label="Maximum Length"
/>
</div>
</HoverCardTrigger>
<HoverCardContent
align="start"
className="w-[260px] text-sm"
side="left"
>
The maximum number of tokens to generate. Requests can use up to 2,048
or 4,000 tokens, shared between prompt and completion. The exact limit
varies by model.
</HoverCardContent>
</HoverCard>
</div>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does MaxLengthSelector() do?
MaxLengthSelector() is a function in the ui codebase, defined in apps/v4/app/(app)/examples/playground/components/maxlength-selector.tsx.
Where is MaxLengthSelector() defined?
MaxLengthSelector() is defined in apps/v4/app/(app)/examples/playground/components/maxlength-selector.tsx at line 20.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free