Detects intents. This operation supports global and hierarchical intent detection, attitude detection, and enterprise detection.
Operation description
Make sure that you fully understand the billing methods and pricing of Tongyi Dianjin before you use this operation.
Prerequisites
- Model Studio and Tongyi Dianjin have been activated.
- You have obtained a workspaceId: Obtain the workspace ID.
Debug
You can run this operation directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the operation runs successfully, OpenAPI Explorer can automatically generate SDK code examples.
Debug
RAM authorization
The following table describes the authorization information of the API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: refers to a specific permission point.
- Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: refers to the resource types supported for authorization in the operation. Details are as follows:
- Required resource types are marked with a preceding asterisk (*).
- For operations that do not support resource-level authorization,
All Resourcesis used.
- Condition key: refers to the condition keys defined by the cloud service itself.
- Dependent action: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions before the operation can succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:RecognizeIntention | none | *All Resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Workspace ID. | llm-xxxx |
| body | object | No | Request body. | |
| analysis | boolean | No | Whether to analyze. | false |
| bizType | string | Yes | Business type. Valid values:
| common |
| conversation | string | Yes | Conversation content. | ##Agent##: Hello, is this Mr. Zhu Jie? This is Zhou Li from Chengxin Finance. We noticed that one of your payments had a billing date yesterday, but you have not yet made the repayment. This may be a small oversight. I am calling to remind you to complete the repayment as soon as possible to avoid affecting your credit record.\n ##Customer##: How is the weather today? |
| globalIntentionList | array<object> | No | Global intent list. Required when the operation type opType is hierarchical. | |
| globalIntentionList | object | No | Global intent. | |
| description | string | No | Intent description. | Normal payment 3 |
| intention | string | No | Intent name. | Normal payment 3 |
| intentionCode | string | No | Intent code. | 1810566978021232640 |
| intentionScript | string | No | Intent script. | Alright, I will not disturb you further. Wishing you a pleasant life. Goodbye! |
| hierarchicalIntentionList | array<object> | No | Hierarchical intent list. Required when the operation type opType is hierarchical. | |
| hierarchicalIntentionList | object | No | Hierarchical intent. | |
| description | string | No | Intent description. | Ask about stock price |
| intention | string | No | Intent name. | Ask about stock price |
| intentionCode | string | No | Intent code. | 1810929291010150400 |
| intentionScript | string | No | Intent script. | Alright, I will not disturb you further. Wishing you a pleasant life. Goodbye! |
| intentionList | array<object> | No | Intent list. Required when the business type is not attitude detection. | |
| intentionList | object | No | Intent. | |
| description | string | No | Intent description. | Customer indicates they forgot to repay |
| intention | string | No | Intent name. | Customer indicates they forgot to repay |
| intentionCode | string | No | Intent code. | 1808766224000262144 |
| intentionScript | string | No | Intent script. | Alright, I will not disturb you further. Wishing you a pleasant life. Goodbye! |
| opType | string | No | Operation type. Valid values:
| common |
| recommend | boolean | No | Recommended intent. | false |
| intentionDomainCode | string | No | Intent library: local intent library code. | collection |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Result code | ||
| cost | long | Processing time. | null |
| data | object | Response data. | |
| analysisProcess | string | Analysis process. | The customer's reply does not match any description in the provided intent list, and does not express any specific need or question regarding bills, repayment, weather, or other services. |
| intentionCode | string | Intent code. | -1 |
| intentionName | string | Intent name. | Other |
| recommendIntention | string | Recommended intent. | The customer is trying to avoid discussing the topic of overdue repayment |
| recommendScript | string | Recommended script. | Mr. Zhu, I understand you may be interested in the weather, but more importantly, your account situation. Please let us focus on your outstanding payments, which are critical to your credit health. |
| intentionScript | string | Intent script. | Mr. Zhu, I understand you may be interested in the weather, but more importantly, your account situation. Please let us focus on your outstanding payments, which are critical to your credit health. |
| dataType | string | Data type. | null |
| errCode | string | Error code. | 0 |
| message | string | Error message. | ok |
| requestId | string | Request ID. | 003D019A-1BB3-53EC-A0D2-CE76DA5D73B1 |
| success | boolean | Indicates whether the request is successful. | true |
| time | string | Timestamp. | 2024-04-24 11:54:34 |
Examples
Normal response example
JSON format
Error codes
Visit the Error Center to view more error codes.
Release notes
| Change time | Change summary | Operation |
|---|