RunDialogAnalysis

Updated at:

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.

Try it now

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 Resources is 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.

ActionAccess levelResource typeCondition keyDependent action
dianjin:RunDialogAnalysisnone
*All Resources
*
    None
None

Request syntax

POST /{workspaceId}/api/virtualHuman/dialog/stream/analysis HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
workspaceIdstringYes

The workspace ID.

llm-xxxx
bodyobjectNo

The request body parameters.

sessionIdstringYes

The session ID.

1759457905S001vejpvd6vej

Response parameters

ElementTypeDescriptionExample
object

ResultCode

successboolean

Indicates whether the request succeeded.

true
dataTypestring

The data type.

null
timestring

The timestamp.

2024-04-24 11:54:34
errCodestring

The error code.

0
messagestring

The error message.

ok
dataobject

The response data.

dialogAnalysisRespListarray<object>

The list of session analysis results.

dialogAnalysisRespListobject

The session analysis result.

sessionIdstring

The session ID.

1759457905S001vejpvd6vej
gmtCreatestring

The time when the session was created.

2024-04-24 11:54:34
statusstring

The execution status of the session analysis task.

Valid values:
  • success: success.
  • pending: pending.
  • error: error.
success
analysisRespobject

The result of the session analysis.

dialogLabelsarray<object>

The list of session labels.

dialogLabelobject

The session label.

namestring

The label name.

Secondary label
valuestring

The label value.

Negotiated repayment
dialogSummarystring

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
dialogExecPlanstring

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.
dialogSopstring

The session SOP.

Marketing
dialogProcessAnalysisobject

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" }
dialogOpenAnalysisobject

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" }
failNodearray

The list of failed nodes.

failNodestring

The failed node.

DIALOG_OPEN_ANALYSIS
requestIdstring

The request ID.

02CD4454-3F2C-57D0-9060-68DEAA1F6993
costlong

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 timeChange summaryOperation

No change history yet.