SubmitChatQuestion
Submit a list of questions and retrieve results by calling the `GetChatQuestionResp` API.
Operation description
Make sure you fully understand the pricing and billing of the Tongyi Dianjin product before you use this API.
Prerequisites
Alibaba Cloud Model Studio and Tongyi Dianjin are activated.
Obtain the workspaceId: Get the workspace identity.
Try it now
You can call this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
RAM authorization
The following table describes the authorization information for this 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 the 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 that support authorization in the operation. Details are as follows:
- Required resource types are marked with a leading 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:SubmitChatQuestion | none | *All Resources * |
| None |
Request syntax
POST /{workspaceId}/api/virtualHuman/chat/submit HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Workspace ID | llm-xxxx |
| body | object | No | Request body | |
| sessionId | string | Yes | Session ID | 237645726354 |
| gmtService | string | Yes | Current time | 2024-09-27 11:23:20 |
| liveScriptContent | string | Yes | Live streaming script | All of our liquor is aged and sold directly from the distillery [current user question], guaranteed to be authentically home-brewed. We can share our address with everyone, and the quality is genuinely guaranteed. This liquor is very smooth and silky on the palate, with layered notes of sauce aroma, grain aroma, and floral and fruity notes. The empty cup retains fragrance for up to 48 hours, with no headache. Today we are selling direct from the manufacturer. When you buy liquor at tobacco and liquor shops, it goes through several middleman stages, each adding markup. Buy here today and you will save a lot of unnecessary money. If you want to store liquor, the blue-bottle Cloud series is a good choice—it gets more fragrant over time. For running errands, hosting dinners, business banquets, or gifts, go with the white-bottle Cloud series. |
| openSmallTalk | boolean | No | Whether to enable small talk. Default: true (enabled) | true |
| questionList | array<object> | Yes | Question list | |
| questionList | object | No | Question | |
| sessionId | string | Yes | Session ID | 1869300950603128834 |
| userId | string | Yes | Unique ID of the user asking questions in the live streaming room | 39485783475638465 |
| userName | string | Yes | Name of the user asking questions in the live streaming room | Zhang** |
| content | string | Yes | Question content | What is the volume |
| gmtCreate | string | Yes | Original question time | 2024-11-17 10:05:00 |
| type | string | No | Question type: PRODUCT_QA (audio submission), GOSSIP (operation submission), UNKNOWN (unknown) | PRODUCT_QA |
| reply | string | No | Reply content, the content of the reply | This is three liters. |
| requestId | string | Yes | Request ID | 0FC6636E-380A-5369-AE01-D1C15BB9B254 |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | ResultCode | ||
| success | boolean | Indicates whether the request was successful | true |
| dataType | string | Data type | null |
| time | string | Timestamp | 2024-04-24 11:54:34 |
| errCode | string | Error code | 0 |
| message | string | Error message | ok |
| data | object | Response data | |
| batchId | string | Batch ID | 1869307330227937280 |
| requestId | string | Request ID | 915AAAB9-4908-5224-9E53-9E9D7D0AA94B |
| cost | long | Time taken | null |
Examples
Success response
JSON format
{
"success": true,
"dataType": null,
"time": "2024-04-24 11:54:34",
"errCode": 0,
"message": "ok",
"data": {
"batchId": 1869307330227937300
},
"requestId": "915AAAB9-4908-5224-9E53-9E9D7D0AA94B",
"cost": 0
}
Error codes
Visit the Error Center to view more error codes.
Release notes
| Change time | Change summary | Operation |
|---|
No change history yet.