MaaS_Typesafe
模型概览
| 项 |
值 |
| 模型 ID(model) |
jev-1.13.0 |
| 上下文长度 |
单次请求合计 64K tokens |
| 最大输入 |
state 与最长单个 questions 条目合计不超过 32K tokens |
| 最大输出 |
无文本生成;结构化 answers + usage |
| 输入模态 |
Text(字符串、JSON 对象、文本数组) |
| 输出模态 |
结构化决策(Choice / Score / Noul) |
请求协议
https
| 参数名 |
类型 |
必填 |
描述 |
| Content-Type |
string |
是 |
application/json |
| Authorization |
string |
是 |
Bearer ${your_AK} |
TypeSafe System One
请求 URL
POST https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/systemone
请求 Body 参数
| 参数名 |
二级参数 |
三级参数 |
类型 |
必填 |
描述 |
| model |
- |
- |
string |
是 |
固定为 MaaS_Typesafe_Jev_1.13(网关映射至厂商 jev-1.13.0 / jev-latest) |
| state |
- |
- |
string / object / array |
是 |
待评估内容;不支持图片/音频/视频 |
| questions |
- |
- |
object |
是 |
问题集合;键名为调用方自定义 ID |
|
[questionId] |
- |
object |
是 |
单题;键名不参与推理 |
|
|
type
|
string |
是 |
choice / score / noul |
|
|
instructions |
string / object / array |
是
|
问题描述;可用反引号引用 state 内路径 |
|
|
criteria |
object / array |
视 type |
Choice:选项 map(最多 255);Score:有序数组(2~10 级);Noul:可选 { "true","false" } 语义 |
请求示例
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/systemone' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Typesafe_Jev_1.13",
"state": "Help! My payouts have been failing for 3 days.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this convey urgency?"
},
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments, invoicing, refunds",
"technical": "Bugs, outages, integrations",
"sales": "Pricing, upgrades, new accounts"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": ["Calm", "Frustrated", "Very angry"]
}
}
}'
响应 Body 参数
| 参数名 |
二级参数 |
三级参数 |
类型 |
描述 |
| model |
- |
- |
string |
网关可回显 MaaS 名或实际上游版本 ID |
| answers |
- |
- |
object |
与 questions 同键 |
|
[questionId] |
- |
object |
单题答案 |
|
|
type |
string |
noul / choice / score |
|
|
noul |
number |
Noul:0~1 |
|
|
choice |
string |
Choice:选中项 |
|
|
probabilities |
object |
Choice/Score:概率分布 |
|
|
confidence |
number |
Choice/Score:0~1 |
|
|
score |
number |
Score:加权等级 |
|
|
legend |
object |
Score:等级索引→描述 |
| usage |
- |
- |
object |
Token 用量 |
|
input_tokens |
- |
integer |
输入 token(计费主依据) |
|
output_tokens |
- |
integer |
输出 token(厂商当前免费) |
响应示例
{
"model": "MaaS_Typesafe_Jev_1.13",
"answers": {
"is_urgent": { "type": "noul", "noul": 0.95 },
"department": {
"type": "choice",
"choice": "billing",
"probabilities": { "billing": 0.88, "technical": 0.12, "sales": 0.0 },
"confidence": 0.81
},
"frustration": {
"type": "score",
"score": 1.05,
"legend": { "0": "Calm", "1": "Frustrated", "2": "Very angry" },
"probabilities": { "0": 0.0, "1": 0.95, "2": 0.05 },
"confidence": 0.92
}
},
"usage": { "input_tokens": 318, "output_tokens": 34 }
}
SDK 调用方式
from typesafe_sdk import Choice, Noul, TypeSafeClient
with TypeSafeClient(base_url="https://genaiapi.cloudsway.net/v1/ai/{endpointPath}") as client:
response = client.system_one(
model="MaaS_Typesafe_Jev_1.13",
state="Help! My payouts have been failing for 3 days.",
questions={
"is_urgent": Noul(instructions="Does this convey urgency?"),
"department": Choice(
instructions="Which team should handle this?",
criteria={"billing": "Payments, invoicing, refunds", "technical": "Bugs, outages"},
),
},
)