from typesafe_sdk import Choice, Noul, Score
response = client.system_one(
"The customer was charged twice and asks for a refund. The service still works.",
{
"refund": Noul(instructions="Does the customer request a refund?"),
"department": Choice(
instructions="Which department should handle this request?",
criteria={
"billing": "Charges, payments and refunds",
"technical": "Software bugs and outages",
},
),
"urgency": Score(
instructions="How urgent is this request?",
criteria=[
"Routine billing request; service works",
"Some functionality unavailable",
"Complete service outage",
],
),
},
)
print(response.answers["refund"].noul)
print(response.answers["department"].choice)
print(response.answers["urgency"].score)