RunDialogAnalysis
Retrieves session analysis results through a streaming API.
Operation description
Before you use this API, make sure that you understand the billing methods and pricing for Tongyi Gold.
Prerequisites
You have activated Alibaba Cloud Model Studio and Tongyi Gold.
You must have a workspace ID. For more information, see workspace identifier.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the API runs successfully, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles permission to call this API. Details:
-
Action: the specific permission point.
-
Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization for the operation. Details:
- Required resource types are marked with a preceding asterisk (*).
- For operations that do not support resource-level authorization,
All Resourcesis displayed.
-
Condition key: the condition keys defined by the cloud service itself.
-
Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:RunDialogAnalysis | none | *All Resources * |
| None |
Request syntax
POST /{workspaceId}/api/virtualHuman/dialog/stream/analysis HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | The workspace ID. | llm-xxxx |
| body | object | No | The request body parameters. | |
| sessionId | string | Yes | The session ID. | 1759457905S001vejpvd6vej |
Response parameters
| Element | Type | Description | Example |
|---|---|---|---|
| object | ResultCode | ||
| success | boolean | Indicates whether the request succeeded. | true |
| dataType | string | The data type. | null |
| time | string | The timestamp. | 2024-04-24 11:54:34 |
| errCode | string | The error code. | 0 |
| message | string | The error message. | ok |
| data | object | The response data. | |
| dialogAnalysisRespList | array<object> | The list of session analysis results. | |
| dialogAnalysisRespList | object | The session analysis result. | |
| sessionId | string | The session ID. | 1759457905S001vejpvd6vej |
| gmtCreate | string | The time when the session was created. | 2024-04-24 11:54:34 |
| status | string | The execution status of the session analysis task. Valid values:
| success |
| analysisResp | object | The result of the session analysis. | |
| dialogLabels | array<object> | The list of session labels. | |
| dialogLabel | object | The session label. | |
| name | string | The label name. | Secondary label |
| value | string | The label value. | Negotiated repayment |
| dialogSummary | string | The session summary. | - Has funding need: No\\n- Has intention: No, the customer believes the issue is resolved and is confused about the current state\\n- Can be marketed to: No, the conversation showed no interest or acceptance of marketing information\\n- Unmet needs: The customer hopes the problem is resolved within three days |
| dialogExecPlan | string | The session execution plan. | 1. Verify the customer's account information and confirm the repayment status.\\n2. If repayment is not received, contact the finance department to confirm whether there is a delay.\\n3. If repayment has been made, update the customer record and apologize.\\n4. Follow up with the customer to ensure the problem is resolved. |
| dialogSop | string | The session SOP. | Marketing |
| dialogProcessAnalysis | object | The session process analysis. | |
| any | The content of the session process analysis. | { "dialogues": [ { "result": [ { "value": "Opening", "key": "Agent" }, { "value": "Refusal", "key": "Customer" } ], "round": 1.0 }, { "result": [ { "value": "Retention", "key": "Agent" }, { "value": "Neutral", "key": "Customer" } ], "round": 2.0 } ], "dialogProcessAnalysisStr": "Round 1: Agent-Opening, Customer-Refusal\\nRound 2: Agent-Retention, Customer-Neutral" } | |
| dialogOpenAnalysis | object | The session open analysis. | |
| any | The content of the session open analysis. | { "dialogues": [ { "result": [ { "value": "Opening", "key": "Agent" }, { "value": "Refusal", "key": "Customer" } ], "round": 1.0 }, { "result": [ { "value": "Retention", "key": "Agent" }, { "value": "Neutral", "key": "Customer" } ], "round": 2.0 } ], "dialogProcessAnalysisStr": "Round 1: Agent-Opening, Customer-Refusal\\nRound 2: Agent-Retention, Customer-Neutral" } | |
| failNode | array | The list of failed nodes. | |
| failNode | string | The failed node. | DIALOG_OPEN_ANALYSIS |
| requestId | string | The request ID. | 02CD4454-3F2C-57D0-9060-68DEAA1F6993 |
| cost | long | The time consumed. | null |
Examples
Success response
JSON format
{
"success": true,
"dataType": null,
"time": "2024-04-24 11:54:34",
"errCode": 0,
"message": "ok",
"data": {
"dialogAnalysisRespList": [
{
"sessionId": "1759457905S001vejpvd6vej",
"gmtCreate": "2024-04-24 11:54:34\n",
"status": "success",
"analysisResp": {
"dialogLabels": [
{
"name": "二级标签",
"value": "协商还款"
}
],
"dialogSummary": "- 是否有资金需求:否\\\\n- 是否有意向:否,客户认为自己已经解决,对当前状态表示不解\\\\n- 是否可营销:否,对话中未表现出对营销信息的兴趣或接受度\\\\n- 待满足需求:客户希望在三天内解决问题",
"dialogExecPlan": "1. 核实客户账户信息,确认还款情况。\\\\n2. 若未收到还款,联系财务部门确认是否到账延迟。\\\\n3. 若已还款,更新客户记录并致歉。\\\\n4. 跟进客户,确保问题解决。",
"dialogSop": "营销",
"dialogProcessAnalysis": {
"key": {
"dialogues": [
{
"result": [
{
"value": "开场白",
"key": "客服"
},
{
"value": "拒绝",
"key": "客户"
}
],
"round": 1
},
{
"result": [
{
"value": "挽留",
"key": "客服"
},
{
"value": "中性",
"key": "客户"
}
],
"round": 2
}
],
"dialogProcessAnalysisStr": "第一轮对话:客服-开场白,客户-拒绝\\n第二轮对话:客服-挽留,客户-中性"
}
},
"dialogOpenAnalysis": {
"key": {
"dialogues": [
{
"result": [
{
"value": "开场白",
"key": "客服"
},
{
"value": "拒绝",
"key": "客户"
}
],
"round": 1
},
{
"result": [
{
"value": "挽留",
"key": "客服"
},
{
"value": "中性",
"key": "客户"
}
],
"round": 2
}
],
"dialogProcessAnalysisStr": "第一轮对话:客服-开场白,客户-拒绝\\n第二轮对话:客服-挽留,客户-中性"
}
}
},
"failNode": [
"DIALOG_OPEN_ANALYSIS"
]
}
]
},
"requestId": "02CD4454-3F2C-57D0-9060-68DEAA1F6993",
"cost": 0
}
Error codes
Visit the Error Center to view more error codes.
Change history
| Change time | Change summary | Operation |
|---|
No change history yet.