从会话添加评测用例
curl --request POST \
--url http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session \
--header 'Content-Type: application/json' \
--data '
{
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
'import requests
url = "http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session"
payload = {
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({evalId: 'case-001', sessionId: 'session-001', userId: 'user-001'})
};
fetch('http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}评测 · 开发服务
从会话添加评测用例
将已有会话转换成评测用例,使用 evalId 指定用例 ID;成功返回 JSON null
仅在启用开发界面的服务中可用,例如 veadk web 或 adk api_server --with_ui;默认 adk api_server 不提供此接口
POST
/
dev
/
apps
/
{app_name}
/
eval-sets
/
{eval_set_id}
/
add-session
从会话添加评测用例
curl --request POST \
--url http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session \
--header 'Content-Type: application/json' \
--data '
{
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
'import requests
url = "http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session"
payload = {
"evalId": "case-001",
"sessionId": "session-001",
"userId": "user-001"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({evalId: 'case-001', sessionId: 'session-001', userId: 'user-001'})
};
fetch('http://localhost:8000/dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}最后修改于 2026年9月19日