CreateTask - Create an automotive service insights task

Updated at:

Create tasks for the automotive service insights service, such as offline transcription tasks and service quality inspection tasks.

Prerequisites

Activate the service and obtain and configure an API key. To prevent security risks from code leaks, configure the API key as an environment variable instead of hard coding it in your code.

NoteTo grant temporary access permissions to third-party applications or users, or want to strictly control risky operations such as accessing or deleting sensitive data, you can use a temporary authentication token.

Compared to a long-term API key, a temporary authentication token is valid for only a short period (60 seconds) and offers higher security. It is suitable for temporary call scenarios and can effectively reduce the risk of API key leaks.

Usage: In your code, replace the API key used for authentication with the obtained temporary authentication token.

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

NameTypeRequiredDescriptionSample value

model

string

Yes

The business type. Set the value to tingwu-automotive-service-insights.

tingwu-automotive-service-insights

input

object

Yes

Specify 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 analyze.

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

Each line must be in the following format:

${Speaker Name}: ${Speaker Content}

For example:

Zhang3: I want to buy an SUV.
Li4: What is your price range?

input.dataId

string

The ID of an uploaded and parsed task to associate.

input.appId

string

Yes

The application ID. Obtain it from the application configuration page in the console.

input.task

string

Yes

The task type. Set the value to createTask to create a task.

createTask

parameters

object

No

The control parameters for automotive service insights. If you pass a null object, the system uses the published online configuration items.

parameters.serviceInsights

object

No

Car Sales Insight: Parameter Object

parameters.serviceInsights.insightsContents

list[]

Yes

A list of dimensions for automotive service insights. Each dimension includes a name and a definition. The definition specifies the criteria that the large model uses to determine whether the dimension is hit.

Maximum of 150

parameters.serviceInsights.insightsContents[i].title

string

Yes

Car Sales Insight

Opening - Brand Introduction

parameters.serviceInsights.insightsContents[i].content

string

Yes

Car sales insight content

Includes a background introduction of the car brand.

parameters.serviceInsights.insightsContents[i].score

string

No

The score for the automotive service 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 value

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-automotive-service-insights",
    "input": {
        "task": "createTask",
        "text": "Zhang*:I want to buy an SUV\nLi*:What is your price range?",
        "appId": "tw_***"
    },
    "parameters": {
        "serviceInsights": {
            "insightsContents": [
                {
                    "title": "Store Arrival - Greeting",
                    "content": "The salesperson actively greets the customer at the beginning of the conversation.",
                    "score": "20"
                },
                {
                    "title": "Store Departure - Customer Information Retention",
                    "content": "The salesperson asks the customer to leave their contact information, such as WeChat, phone number, or business card.",
                    "score": "30"
                },
                {
                    "title": "Store Arrival - Beverage Offer",
                    "content": "The salesperson actively 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"
}