Tin

Examples · learn/29-voice · 299 of 339

task-1

examples/learn/29-voice/task-1.tintin run examples/learn/29-voice/task-1.tin
/// Book a table for a number of people.
guarded tool fn book(people: int): string => "booked for {people}"

voice agent Host {
  model: "mock"
  tools: [book]
}

fn main() {
  let s = Host.open()
  s.say("book a table for 4")
  // print each tool result and whether it worked, then hang up after the spoken answer
}