SubmitChatQuestion

Updated at:

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.

Try it now

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 Resources is 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.

ActionAccess levelResource typeCondition keyDependent action
dianjin:SubmitChatQuestionnone
*All Resources
*
    None
None

Request syntax

POST /{workspaceId}/api/virtualHuman/chat/submit HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
workspaceIdstringYes

Workspace ID

llm-xxxx
bodyobjectNo

Request body

sessionIdstringYes

Session ID

237645726354
gmtServicestringYes

Current time

2024-09-27 11:23:20
liveScriptContentstringYes

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

Whether to enable small talk. Default: true (enabled)

true
questionListarray<object>Yes

Question list

questionListobjectNo

Question

sessionIdstringYes

Session ID

1869300950603128834
userIdstringYes

Unique ID of the user asking questions in the live streaming room

39485783475638465
userNamestringYes

Name of the user asking questions in the live streaming room

Zhang**
contentstringYes

Question content

What is the volume
gmtCreatestringYes

Original question time

2024-11-17 10:05:00
typestringNo

Question type: PRODUCT_QA (audio submission), GOSSIP (operation submission), UNKNOWN (unknown)

PRODUCT_QA
replystringNo

Reply content, the content of the reply

This is three liters.
requestIdstringYes

Request ID

0FC6636E-380A-5369-AE01-D1C15BB9B254

Response parameters

NameTypeDescriptionExample
object

ResultCode

successboolean

Indicates whether the request was successful

true
dataTypestring

Data type

null
timestring

Timestamp

2024-04-24 11:54:34
errCodestring

Error code

0
messagestring

Error message

ok
dataobject

Response data

batchIdstring

Batch ID

1869307330227937280
requestIdstring

Request ID

915AAAB9-4908-5224-9E53-9E9D7D0AA94B
costlong

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 timeChange summaryOperation

No change history yet.