Loading the Kaya editor…
type Sentiment = "positive" + {is: "happy or satisfied"}
               | "negative" + {is: "sad or dissatisfied"}
               | "neutral" + {is: "factual or indifferent"}

// Uses your configured model to choose one of the three values.
let userMessage = "This made my day. Thank you so much!"
let mood = userMessage as Sentiment
"Sentiment: {{mood}}"