Skip to main content

single_select_schema

Function single_select_schema 

pub fn single_select_schema(choices: &[String]) -> Value
Expand description

Build the restricted JSON Schema for a single-select enum elicitation.

choices is the user-visible list. The wire-format const values are index-based (choice-0, choice-1, …) so the response → text round-trip survives non-unique or empty display strings.