curl --request POST \
--url https://api.tikway.ai/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-6-luna",
"input": "我被重复扣款了两次,请今天帮我处理退款,其他功能还能正常使用。",
"questions": [
{
"name": "urgent",
"type": "predicate",
"instructions": "用户是否需要尽快处理?"
},
{
"name": "department",
"type": "choice",
"instructions": "应该交给哪个部门?",
"choices": [
{
"value": "billing",
"description": "账单、扣款和退款问题"
},
{
"value": "technical",
"description": "产品功能和技术故障"
}
]
},
{
"name": "severity",
"type": "score",
"instructions": "问题有多严重?",
"levels": [
{
"label": "Minor"
},
{
"label": "Workaround available"
},
{
"label": "Fully blocked"
}
]
}
]
}
'{
"model": "typesafe/jev-latest",
"answers": [
{
"name": "urgent",
"probability": 0.82,
"type": "predicate"
},
{
"choice": "billing",
"confidence": 1,
"name": "department",
"probabilities": [
{
"probability": 1,
"value": "billing"
},
{
"probability": 0,
"value": "technical"
}
],
"type": "choice"
},
{
"confidence": 0.58,
"legend": {
"0": "Minor",
"1": "Workaround available",
"2": "Fully blocked"
},
"name": "severity",
"probabilities": [
{
"label": "Minor",
"probability": 0.74,
"value": 0
},
{
"label": "Workaround available",
"probability": 0.24,
"value": 1
},
{
"label": "Fully blocked",
"probability": 0.02,
"value": 2
}
],
"score": 0.28,
"type": "score"
}
],
"usage": {
"completion_tokens": 61,
"prompt_tokens": 375,
"total_tokens": 436
}
}Jev - 决策评估
OpenAI Decisions 格式:input + questions 数组;answers 顺序与问题一致,支持 predicate、choice、score 及 refusal。支持通过端点配置调用 TypeSafe Jev。跨协议时问题 name 必须唯一;字符串和布尔选项转换成同一个键时返回参数错误。
示例模型 ID 必须已在目标环境配置,并关联可用账号和端点。
curl --request POST \
--url https://api.tikway.ai/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-6-luna",
"input": "我被重复扣款了两次,请今天帮我处理退款,其他功能还能正常使用。",
"questions": [
{
"name": "urgent",
"type": "predicate",
"instructions": "用户是否需要尽快处理?"
},
{
"name": "department",
"type": "choice",
"instructions": "应该交给哪个部门?",
"choices": [
{
"value": "billing",
"description": "账单、扣款和退款问题"
},
{
"value": "technical",
"description": "产品功能和技术故障"
}
]
},
{
"name": "severity",
"type": "score",
"instructions": "问题有多严重?",
"levels": [
{
"label": "Minor"
},
{
"label": "Workaround available"
},
{
"label": "Fully blocked"
}
]
}
]
}
'{
"model": "typesafe/jev-latest",
"answers": [
{
"name": "urgent",
"probability": 0.82,
"type": "predicate"
},
{
"choice": "billing",
"confidence": 1,
"name": "department",
"probabilities": [
{
"probability": 1,
"value": "billing"
},
{
"probability": 0,
"value": "technical"
}
],
"type": "choice"
},
{
"confidence": 0.58,
"legend": {
"0": "Minor",
"1": "Workaround available",
"2": "Fully blocked"
},
"name": "severity",
"probabilities": [
{
"label": "Minor",
"probability": 0.74,
"value": 0
},
{
"label": "Workaround available",
"probability": 0.24,
"value": 1
},
{
"label": "Fully blocked",
"probability": 0.02,
"value": 2
}
],
"score": 0.28,
"type": "score"
}
],
"usage": {
"completion_tokens": 61,
"prompt_tokens": 375,
"total_tokens": 436
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
用于 POST /v1/systemone,采用 TypeSafe 官方原生请求结构。调用本网关时使用模型广场中的 typesafe/jev-latest;直接调用 TypeSafe 官方接口时使用 jev-latest。字段依据 https://docs.typesafe.ai/api。
模型 ID。本网关示例为 typesafe/jev-latest;TypeSafe 官方接口示例为 jev-latest。
1"typesafe/jev-latest"
"jev-latest"
所有问题共享的待评估材料,可以是纯文本、结构化记录或数组。
"我被重复扣款了两次,请今天帮我处理退款,其他功能还能正常使用。"
{
"ticket": {
"message": "发票抬头写错了,需要重新开票。",
"invoice_issued": true
}
}
[
{
"role": "user",
"content": "已经联系三次了,请安排人工处理退款。"
}
]
以自定义问题 ID 为键的对象。答案按相同 ID 返回;问题 ID 不会提供给模型,判断要求必须写在 instructions 中。
Hide child attributes
Hide child attributes
- Noul:是非判断
- Choice:选项判断
- Score:等级评分
Hide child attributes
Hide child attributes
判断一个是非问题,答案表示是的概率。
"noul"待判断的是非问题或命题。可使用结构化内容补充问题需要引用的数据。
"用户是否明确要求当天处理?"
响应
类型化决策答案和用量。未返回输出 Token 的上游可省略 completion_tokens,转换为 TypeSafe 时补 0。

