擷取會話資料。
介面說明
擷取會話資料
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cms:GetThreadData |
get |
*DigitalEmployee
|
無 | 無 |
請求文法
GET /digitalEmployee/{name}/thread/{threadId}/data HTTP/1.1
路徑參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| name |
string |
是 |
數字員工名稱 |
test |
| threadId |
string |
是 |
會話 id |
thread_id01 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| nextToken |
string |
否 |
分頁遊標。 |
xxxxxxxxxx |
| maxResults |
integer |
否 |
返回會話資料最巨量資料,最大值:100 |
1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| maxResults |
integer |
最大結果數量 |
1 |
| data |
array<object> |
訊息資料 |
|
|
array<object> |
訊息資料 |
||
| traceId |
string |
當前 message 請求的 id 資料 根資料中第一個追蹤識別碼 |
3b5287b717636040171772050d0095 |
| requestId |
string |
當前 message 請求的 id 資料 根資料中第一個 RequestID |
8FDE2569-626B-5176-9844-28877A***** |
| messages |
array<object> |
會話的訊息列表 |
|
|
array<object> |
訊息資料明細結構 |
||
| version |
string |
訊息資料的版本號碼 |
v0.1.0 |
| parentCallId |
string |
上一層級執行 ID |
3b5287b7176360 |
| callId |
string |
當前執行 ID |
3b5287b7176360 |
| role |
string |
訊息發起角色 |
user |
| seq |
integer |
訊息序號 |
0 |
| timestamp |
string |
timestamp / 納秒 |
1768702985000000000 |
| type |
string |
訊息具體類型 |
task_finished |
| detail |
string |
訊息明細 |
context of model exceed |
| contents |
array<object> |
內容資訊 |
|
|
object |
內容資訊明細結構 |
{ "append": false, "lastChunk": false, "type": "text", "value": "result output chunk" } |
|
| tools |
array<object> |
工具使用列表 |
|
|
object |
工具明細結構 |
{ "arguments": { "confidence": "high", "intent": "analyser", "is_new_turn": true, "language": "en", "title": "Root Cause of Alert" }, "id": "IntentRecognition", "name": "IntentRecognition", "status": "start", "toolCallId": "019bc1cb-adad" } |
|
| agents |
array<object> |
調用的 Agent 列表 |
|
|
object |
調用的 Agent 詳細內容 |
{ "callId": "019bc1cb-adad", "id": "analyser", "inputs": [ { "append": false, "lastChunk": false, "type": "text", "value": "Analyze this trace: TraceID=xxx" } ], "name": "analyser", "status": "start" } |
|
| events |
array<object> |
事件列表 |
|
|
object |
事件詳細內容 |
{ "payload": { "error": { "code": "TASK_FAILED", "message": "Invalid task parameter", "suggestion": "" }, "statistics": { "duration": 300000 }, "success": false }, "type": "task_finished" } |
|
| artifacts |
array<object> |
產物產出資訊 |
|
|
object |
產物明細的結構 |
{ "artifactId": "019bc1cb-9600-703axxx", "name": "sql output", "description": "sql generation task result", "extensions": ["sql_generation_tool", "sql_diagnosis"], "metadata": { "model": "qwen3-coder-plus" }, "parts": [ { "text": "select * from table", "kind": "text" } ] } |
|
| nextToken |
string |
分頁遊標。 |
xxxxxxxxx |
| requestId |
string |
Id of the request |
8FDE2569-626B-5176-9844-28877A***** |
| threadId |
string |
會話 id |
thread_id01 |
| digitalEmployeeName |
string |
數字員工名稱 |
test |
樣本
正常返回樣本
JSON格式
{
"maxResults": 1,
"data": [
{
"traceId": "3b5287b717636040171772050d0095",
"requestId": "8FDE2569-626B-5176-9844-28877A*****",
"messages": [
{
"version": "v0.1.0",
"parentCallId": "3b5287b7176360",
"callId": "3b5287b7176360",
"role": "user",
"seq": 0,
"timestamp": "1768702985000000000",
"type": "task_finished",
"detail": "context of model exceed",
"contents": [
{
"append": false,
"lastChunk": false,
"type": "text",
"value": "result output chunk"
}
],
"tools": [
{
"arguments": {
"confidence": "high",
"intent": "analyser",
"is_new_turn": true,
"language": "en",
"title": "Root Cause of Alert"
},
"id": "IntentRecognition",
"name": "IntentRecognition",
"status": "start",
"toolCallId": "019bc1cb-adad"
}
],
"agents": [
{
"callId": "019bc1cb-adad",
"id": "analyser",
"inputs": [
{
"append": false,
"lastChunk": false,
"type": "text",
"value": "Analyze this trace: TraceID=xxx"
}
],
"name": "analyser",
"status": "start"
}
],
"events": [
{
"payload": {
"error": {
"code": "TASK_FAILED",
"message": "Invalid task parameter",
"suggestion": ""
},
"statistics": {
"duration": 300000
},
"success": false
},
"type": "task_finished"
}
],
"artifacts": [
{
"artifactId": "019bc1cb-9600-703axxx",
"name": "sql output",
"description": "sql generation task result",
"extensions": [
"sql_generation_tool",
"sql_diagnosis"
],
"metadata": {
"model": "qwen3-coder-plus"
},
"parts": [
{
"text": "select * from table",
"kind": "text"
}
]
}
]
}
]
}
],
"nextToken": "xxxxxxxxx",
"requestId": "8FDE2569-626B-5176-9844-28877A*****",
"threadId": "thread_id01",
"digitalEmployeeName": "test"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。