Skip to main content

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

NameTypeRequiredDescriptionExample
modelstringYesDefines the business type. Set the value to tingwu-service-insights.tingwu-service-insights
inputobjectYesPass the relevant business parameters.
input.fileUrlstringThe 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.textstringThe text to be analyzed.Each line must follow this format:${Speaker Name}: ${Speaker Content}For example:
Zhang3: I want to buy an SUV.
Li4: What price range are you looking for?
input.dataIdstringAssociates the task with a task that has been uploaded and parsed.
input.appIdstringYesThe application ID. You can obtain it from the Application Configuration page in the console.
input.taskstringYesDefines the task type. Set the value to createTask to create a task.createTask
parametersobjectNoThe control parameters for general service insights. If you pass a null object, the published configuration items are used.
parameters.serviceInsightsobjectNoThe parameter object for general service insights.
parameters.serviceInsights.insightsContentslist[]YesA 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].titlestringYesThe title of the general service insight item.Opening Spiel
parameters.serviceInsights.insightsContents[i].contentstringYesThe 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].scorestringNoThe 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: Success

  • 1: In progress

  • 2: Failed

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"
}
Agent Development
Agent Context
Agent Governance & Evolution
Store
Application Marketplace