CreateTask - Create a general service insight task
Creates a general service insight task. This includes creating offline transcription tasks and service quality inspection tasks.
Endpoint
https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Request method
POST
Request headers
Authorization: Bearer {api-key} // Replace {api-key} with your actual API key.
Content-Type: application/json
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
model | string | Yes | Defines the business type. Set the value to | tingwu-service-insights |
input | object | Yes | Pass the relevant business parameters. | |
input.fileUrl | string | The fileUrl, text, and dataId parameters are mutually exclusive. You must specify one of them. | The OSS URL of the file to be analyzed. | https://.oss-cn-hangzhou.aliyuncs.com/%E8%AF%95%E9%A9%BE%E6%A1%88%E4%BE%8Bsmall.wav?OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Expires=&Signature=YOUR_SIGNATURE |
input.text | string | The text to be analyzed. | Each line must follow this format: ${Speaker Name}: ${Speaker Content} For example: | |
input.dataId | string | Associates the task with a task that has been uploaded and parsed. | ||
input.appId | string | Yes | The application ID. You can obtain it from the Application Configuration page in the console. | |
input.task | string | Yes | Defines the task type. Set the value to | createTask |
parameters | object | No | The control parameters for general service insights. If you pass a null object, the published configuration items are used. | |
parameters.serviceInsights | object | No | The parameter object for general service insights. | |
parameters.serviceInsights.insightsContents | list[] | Yes | A list of dimensions for general service insights. It includes the dimension names and definitions, which specify the criteria for the large model to determine whether a dimension is hit. Maximum: 150 | |
parameters.serviceInsights.insightsContents[i].title | string | Yes | The title of the general service insight item. | Opening Spiel |
parameters.serviceInsights.insightsContents[i].content | string | Yes | The content of the general service insight item. | The customer representative did not use an opening spiel when answering the call, such as "Hello, I'm happy to help you." |
parameters.serviceInsights.insightsContents[i].score | string | No | The score for the insight item. This value is added or subtracted when the insight item is hit. If the item is not hit, the score is 0. The value must be in the range of -100 to 100. | 50 |
Response parameters
Name | Type | Description | Example |
|---|---|---|---|
output | object | ||
output.dataId | string | The task ID. | |
output.status | string |
| 0 |
usage | object | The usage. This is currently a null object. | {} |
code | string | The error code. | InvalidParameter |
message | string | The error message. | Agent Input text format error. |
request_id | string | The request ID. | f97ee37d-0f9c-9b93-b6bf-bd263a232bf9 |
Request example
Replace "sk-***" in the Authorization request header with your actual Alibaba Cloud Model Studio API key.
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
--header 'Authorization: Bearer sk-******e181c' \
--header 'Content-Type: application/json' \
--data '{
"model": "tingwu-service-insights",
"input": {
"task": "createTask",
"text": "Zhang*: I want to buy an SUV\nLi*: What price range are you looking for?",
"appId": "tw_***"
},
"parameters": {
"serviceInsights": {
"insightsContents": [
{
"title": "Store Arrival Greeting - Welcome Message",
"content": "The sales representative proactively greets the customer with a welcome message at the beginning of the conversation.",
"score": "20"
},
{
"title": "Store Departure Farewell - Customer Information Retention",
"content": "The sales representative asks the customer to leave their contact information, such as WeChat, phone number, or business card.",
"score": "30"
},
{
"title": "Store Arrival Greeting - Beverage Offer",
"content": "The sales representative proactively asks the customer if they need a beverage (such as coffee, orange juice, water, or tea), snacks, or fruit during the reception.",
"score": "50"
}
]
}
}
}'
Response example
{
"output": {
"dataId": "dj***"
},
"usage": {},
"request_id": "8313c0bc-ff3f-98e8-b87a-0118f6fe3049"
}