Jev 结构化决策
curl --request POST \
--url https://jev.bocha.cn/v1/systemone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"state": "我的订单被重复扣款,请退还多收的费用。",
"questions": {
"department": {
"type": "choice",
"instructions": "选择负责团队。",
"criteria": {
"billing": "账单、付款、退款",
"technical": "技术故障",
"sales": "采购咨询"
}
},
"refund": {
"type": "noul",
"instructions": "客户是否要求退款?"
},
"relevance": {
"type": "score",
"instructions": "这条消息与退款处理的相关程度?",
"criteria": [
"无关",
"间接相关",
"直接相关"
]
}
}
}
'import requests
url = "https://jev.bocha.cn/v1/systemone"
payload = {
"state": "我的订单被重复扣款,请退还多收的费用。",
"questions": {
"department": {
"type": "choice",
"instructions": "选择负责团队。",
"criteria": {
"billing": "账单、付款、退款",
"technical": "技术故障",
"sales": "采购咨询"
}
},
"refund": {
"type": "noul",
"instructions": "客户是否要求退款?"
},
"relevance": {
"type": "score",
"instructions": "这条消息与退款处理的相关程度?",
"criteria": ["无关", "间接相关", "直接相关"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
state: '我的订单被重复扣款,请退还多收的费用。',
questions: {
department: {
type: 'choice',
instructions: '选择负责团队。',
criteria: {billing: '账单、付款、退款', technical: '技术故障', sales: '采购咨询'}
},
refund: {type: 'noul', instructions: '客户是否要求退款?'},
relevance: {
type: 'score',
instructions: '这条消息与退款处理的相关程度?',
criteria: ['无关', '间接相关', '直接相关']
}
}
})
};
fetch('https://jev.bocha.cn/v1/systemone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "bocha-jev-v1",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.88,
"technical": 0.04,
"sales": 0.08
},
"confidence": 0.88
},
"refund": {
"type": "noul",
"noul": 0.98
},
"relevance": {
"type": "score",
"score": 1.93,
"probabilities": {
"0": 0.02,
"1": 0.03,
"2": 0.95
},
"confidence": 0.95,
"legend": {
"0": "无关",
"1": "间接相关",
"2": "直接相关"
}
}
},
"usage": {
"input_tokens": 348,
"output_tokens": 0
},
"metadata": {
"inference_ms": 185.36,
"cuda_graph_enabled": true,
"checkpoint_status": "experimental",
"calibrated": true,
"confidence_definition": "maximum candidate probability; not guaranteed correctness"
}
}Bocha Jev
根据共享上下文,为候选选择、等级评分或真假判断返回结构化决策结果。
POST
https://jev.bocha.cn
/
v1
/
systemone
Jev 结构化决策
curl --request POST \
--url https://jev.bocha.cn/v1/systemone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"state": "我的订单被重复扣款,请退还多收的费用。",
"questions": {
"department": {
"type": "choice",
"instructions": "选择负责团队。",
"criteria": {
"billing": "账单、付款、退款",
"technical": "技术故障",
"sales": "采购咨询"
}
},
"refund": {
"type": "noul",
"instructions": "客户是否要求退款?"
},
"relevance": {
"type": "score",
"instructions": "这条消息与退款处理的相关程度?",
"criteria": [
"无关",
"间接相关",
"直接相关"
]
}
}
}
'import requests
url = "https://jev.bocha.cn/v1/systemone"
payload = {
"state": "我的订单被重复扣款,请退还多收的费用。",
"questions": {
"department": {
"type": "choice",
"instructions": "选择负责团队。",
"criteria": {
"billing": "账单、付款、退款",
"technical": "技术故障",
"sales": "采购咨询"
}
},
"refund": {
"type": "noul",
"instructions": "客户是否要求退款?"
},
"relevance": {
"type": "score",
"instructions": "这条消息与退款处理的相关程度?",
"criteria": ["无关", "间接相关", "直接相关"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
state: '我的订单被重复扣款,请退还多收的费用。',
questions: {
department: {
type: 'choice',
instructions: '选择负责团队。',
criteria: {billing: '账单、付款、退款', technical: '技术故障', sales: '采购咨询'}
},
refund: {type: 'noul', instructions: '客户是否要求退款?'},
relevance: {
type: 'score',
instructions: '这条消息与退款处理的相关程度?',
criteria: ['无关', '间接相关', '直接相关']
}
}
})
};
fetch('https://jev.bocha.cn/v1/systemone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "bocha-jev-v1",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.88,
"technical": 0.04,
"sales": 0.08
},
"confidence": 0.88
},
"refund": {
"type": "noul",
"noul": 0.98
},
"relevance": {
"type": "score",
"score": 1.93,
"probabilities": {
"0": 0.02,
"1": 0.03,
"2": 0.95
},
"confidence": 0.95,
"legend": {
"0": "无关",
"1": "间接相关",
"2": "直接相关"
}
}
},
"usage": {
"input_tokens": 348,
"output_tokens": 0
},
"metadata": {
"inference_ms": 185.36,
"cuda_graph_enabled": true,
"checkpoint_status": "experimental",
"calibrated": true,
"confidence_definition": "maximum candidate probability; not guaranteed correctness"
}
}Authorizations
Body
application/json