AnalyzeConversation
Retrieves conversation analysis results, such as conversation summaries, title generation, keywords, field information extraction, problems and solutions, service quality inspections, to-do items, satisfaction scores, emotion detection, QA extraction, user personas, and tag categorization. Applications can invoke this operation by making HTTP calls.
Operation description
Before using this API, understand the billing methods and pricing of Tongyi Xiaomi CCAI-Conversation Analysis AIO.
Prerequisites
- Activate the Tongyi Xiaomi CCAI-Conversation Analysis AIO service.
- Create an application: Create a Tongyi Xiaomi CCAI-Conversation Analysis AIO application in the Application Center and obtain the APP-ID and WORKSPACE-ID. For more information, see Get an APP-ID and a WORKSPACE-ID.
Try it now
Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.
RAM authorization
No authorization for this operation. If you encounter issues with this operation, contact technical support.
Request syntax
POST /{workspaceId}/ccai/app/{appId}/analyze_conversation HTTP/1.1
Path Parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | The workspace ID. | llm-368******3ifum |
| appId | string | Yes | The application ID. | a070a49c681f4a95a0f0*********35c |
Request parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| body | object | No | The request body. | |
| categoryTags | array<object> | No | A list of tag categorizations. | |
object | No | |||
| tagDesc | string | No | The description of the tag. | During the process of serving the customer, whether the customer service has over-promised based on existing service standards |
| tagName | string | No | The name of the tag. | Customer service over-promise |
| dialogue | object | No | A list of dialogue content. | |
| sentences | array<object> | Yes | The dialogue content. | |
object | Yes | |||
| role | string | Yes | The role in the conversation:
| user |
| text | string | Yes | The dialogue text. | How to apply for a new card |
| sessionId | string | No | The ID of the customer service session. | session-01 |
| examples | array<object> | No | A list of instruction examples. | |
array<object> | Yes | An instruction example. | ||
| output | string | Yes | An example of the output. | Problem description: asking about the 2.2 update time; processing solution: already informed |
| sentences | array<object> | Yes | A list of dialogue content examples. | |
object | Yes | An example of the dialogue content. | ||
| chatId | string | No | The ID of each conversation turn. | chat-01 |
| role | string | Yes | The role in the conversation:
| user |
| text | string | Yes | The dialogue text. | When will it be updated |
| fields | array<object> | No | A list of fields to extract during information extraction. | |
array<object> | Yes | The structure of the field. | ||
| code | string | No | The field code. | phoneNumber |
| desc | string | Yes | The field description. | Reason classification for the user's incoming call inquiry, mainly complaints, consultations, policy suggestions, etc. |
| enumValues | array<object> | No | A list of enumeration values. | |
object | Yes | |||
| desc | string | Yes | The enumeration description. | The customer has new requirements/new scenarios, and the customer service follows up to communicate the requirement details |
| enumValue | string | Yes | The enumeration value. | New business expansion |
| name | string | Yes | The field name. | Reason for call type |
| modelCode | string | No | The model code. | tyxmTurbo |
| resultTypes | array | Yes | The instruction task type. | |
string | Yes | summary – Conversation summary. title – Title generation. fields – Field extraction. keywords – Keyword extraction. service_inspection – Service quality inspection. question_solution – Questions and solutions. actions – To-do items. satisfaction – Satisfaction level. emotion_detection – Emotion detection. questions_and_answer – Q&A extraction. user_profile – User profile. category_tag – Tag categorization. | summary | |
| sceneName | string | No | The name of the scenario. | Alibaba Cloud ticket quality inspection scenario |
| serviceInspection | object | No | The structure of the service quality inspection. | |
| inspectionContents | array<object> | Yes | A list of service quality inspection dimension structures. | |
object | Yes | The structure of the service quality inspection dimension. | ||
| content | string | Yes | The description of the service quality inspection dimension. | During the process of serving the customer, whether the customer service has over-promised based on existing service standards, e.g., the fastest delivery time is 12 hours, and a faster delivery time cannot be promised to the customer. |
| title | string | Yes | The name of the service quality inspection dimension. | Whether the customer service over-promises |
| inspectionIntroduction | string | Yes | A detailed introduction and description of the service quality inspection scenario. | Please check whether the customer service has any improper behavior, including: over-promising, intentionally extracting customer privacy information, etc. |
| sceneIntroduction | string | Yes | The service quality inspection scenario. | Insurance sales scenario |
| stream | boolean | Yes | Required. Specifies whether to use streaming output. Set to `true` to return the response in a stream. Set to `false` to return the complete response at once. | false |
| userProfiles | array<object> | No | A list of user personas. | |
object | No | |||
| name | string | No | The name. | sex |
| value | string | No | The description. | Indicates the customer's gender, select a value from the list[”Male”, “Female”] |
| timeConstraintList | array | No | ||
string | No | |||
| sourceCallerUid | string | No | ||
| customPrompt | string | No | ||
| responseFormatType | string | No |
Response elements
Element | Type | Description | Example |
|---|---|---|---|
object | The response schema. | ||
| errorCode | string | The error code. | success |
| errorInfo | string | The error message. | success |
| finishReason | string | If streaming output is enabled, this parameter is `null` while the response is being generated. If the generation stops because of a stop token, the value is `stop`. | stop |
| requestId | string | The unique ID that the system generates for the request. | 968A8634-FA2C-5381-9B3E-C552DED7E8BF |
| success | boolean | Indicates whether the request was successful. | True |
| text | string | The result that the application returns. | This conversation appears to be a discussion between the customer service and the customer about a service or product, but the specific content is difficult to understand clearly because the language in the conversation is fragmented and abstract. |
| inputTokens | string | ||
| outputTokens | string | ||
| totalTokens | string |
Examples
Success response
JSON format
{
"errorCode": "success",
"errorInfo": "success",
"finishReason": "stop",
"requestId": "968A8634-FA2C-5381-9B3E-C552DED7E8BF",
"success": true,
"text": "这段对话似乎是客服与客户之间关于一个服务或产品的讨论,但具体内容难以明确理解,因为对话中的言语比较零散和抽象。",
"inputTokens": "",
"outputTokens": "",
"totalTokens": ""
}
Error codes
HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | CCAI.Throttling.Qps | Trigger current QPS limit, pay API please buy higher QPS, the free API if you have special requirements, please contact us through the DingTalk group (62730018475). | Trigger current limit, pay API please buy higher QPS, free API if you have special requirements, please contact us through the DingTalk group (62730018475). |
| 400 | CCAI.Throttling.Qpm | Trigger QPM flow restriction. Please purchase higher QPM for paid API. If free API has special requirements, please contact us through DingTalk group (62730018475). | Trigger QPM flow restriction. Please purchase higher QPM for paid API. If free API has special requirements, please contact us through DingTalk group (62730018475). |
| 400 | CCAI.InvalidParam.NotExist | The specified parameter %s is not valid. | The request parameter does not exist. |
| 400 | CCAI.ParamInvalid.IllegalParamValue | The parameter value of the request API is illegal %s. | The parameter value of the request API is illegal. |
| 500 | CCAI.InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 403 | CCAI.TenantPermission.NoAuth | The current account does not have the permission to specify the business space. Please authorize the business space permission. | The current account does not have the permission to specify the business space. Please authorize the business space permission. |
| 403 | CCAI.ParamNotfound.MissParam | Parameter verification failed, The specified parameter %s is missing. | Parameter validation failed. The specified parameter is missing. |
| 403 | CCAI.IllegalPermission.NoAuth | User not authorized to operate on the specified resource %s . | The user is not authorized to operate the specified resource |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.