state。answers 的键与请求里的问题 id 相同。同一次请求可以混用三种问题:noul:是/否。返回答案为「是」的概率,范围 0 到 1。choice:从你定义的选项里选一个,并返回完整概率分布。每个 Choice 最多 255 个选项。score:按有序等级打分,返回概率加权后的分数,可以落在两个等级之间。等级至少 2 个,最多 10 个。instructions 可以是字符串、对象或数组。对象适合把问题和它要引用的数据拆开,在问题里用反引号标出字段名,例如 `potential_duplicate`。Authorization: Bearer sk-...。Content-Type 为 application/json。state。answers 的键与请求里的问题 id 相同。同一次请求可以混用三种问题:noul:是/否。返回答案为「是」的概率,范围 0 到 1。choice:从你定义的选项里选一个,并返回完整概率分布。每个 Choice 最多 255 个选项。score:按有序等级打分,返回概率加权后的分数,可以落在两个等级之间。等级至少 2 个,最多 10 个。instructions 可以是字符串、对象或数组。对象适合把问题和它要引用的数据拆开,在问题里用反引号标出字段名,例如 `potential_duplicate`。Authorization: Bearer sk-...。Content-Type 为 application/json。{
"model": "jev-latest",
"questions": {
"department": {
"criteria": {
"billing": "Payments, invoicing, refunds",
"sales": "Pricing, upgrades, new accounts",
"technical": "Bugs, outages, integrations"
},
"instructions": "Which team should handle this?",
"type": "choice"
},
"frustration": {
"criteria": [
"Calm",
"Frustrated",
"Very angry"
],
"instructions": "How frustrated is the customer?",
"type": "score"
},
"is_urgent": {
"criteria": {
"false": "No urgency expressed",
"true": "Explicitly time-sensitive"
},
"instructions": "Does this convey urgency?",
"type": "noul"
}
},
"state": "Help! My payouts have been failing for 3 days."
}{
"model": "jev-latest",
"questions": {
"department": {
"criteria": {
"billing": "Payments",
"sales": "Pricing and upgrades",
"technical": "Bugs and outages"
},
"instructions": {
"question": "Which team?"
},
"type": "choice"
}
},
"state": {
"message": "Need help"
}
}{
"model": "jev-latest",
"questions": {
"is_urgent": {
"criteria": {
"false": "No urgency expressed",
"true": "Explicitly time-sensitive"
},
"instructions": "Does this convey urgency?",
"type": "noul"
}
},
"state": "Help! My payouts have been failing for 3 days."
}{
"model": "jev-latest",
"questions": {
"frustration": {
"criteria": [
"Calm",
"Frustrated",
"Very angry"
],
"instructions": "How frustrated is the customer?",
"type": "score"
}
},
"state": [
"payment failed",
"today"
]
}{
"model": "jev-latest",
"questions": {
"same_person": {
"instructions": {
"potential_duplicate": {
"last_employer": "Google",
"location": "Oakland, California",
"name": "John Smith"
},
"question": "Is the resume for the same person as `potential_duplicate`?"
},
"type": "noul"
}
},
"state": "John Smith, software engineer, previously at Google in the Bay Area."
}[
"TypeSafe"
]