Slide 47
Slide 47 text
// Structured output using response schema
responseSchema = Schema.arr(
name = "characters", description = "List of characters",
items = Schema.obj(
name = "character", description = "A characters",
contents = arrayOf(
Schema.str("name", "Name of the character"),
Schema.int("age", "Age of the character"),
Schema.str("species", "Species of the character"),
Schema.enum(
name = "accessory", description = "Accessory of the character",
values = listOf("hat", "glasses", "scarf"),
),
[...]