RunGenerateQuestions
Submits a query and returns several related queries.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:
-
Action: the specific permission point.
-
Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization in the operation. For more information, see the following:
- Required resource types are marked with a leading *.
- For operations that do not support resource-level authorization,
All resourcesis used.
-
Condition key: the condition keys defined by the cloud service itself.
-
Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of the dependent actions at the same time for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunGenerateQuestions | get | *All resources * |
| None |
Request syntax
POST /miaodu/stream/runGenerateQuestions HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| WorkspaceId | string | Yes | Unique identifier of the Alibaba Cloud Model Studio workspace: Workspace ID | llm-w335gauzlbba2vze |
| SessionId | string | No | Session ID | f486c4e2-b773-4d65-88f8-2ba540610456 |
| DocId | string | No | Document ID | oOgIwodFANW1u5MnqxysOh1rtld3xn |
| ReferenceContent | string | No | The document content to extract questions from. If this parameter is not empty, this text takes precedence; if it is empty, the docId takes precedence. | Reference content |
| ModelName | string | No | Custom model name | quanmiao-max、quanmiao-plus |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | 1813ceee-7fe5-41b4-87e5-982a4d18cca5 |
| Header | object | Response header | |
| ErrorCode | string | Error code | RateLimit |
| ErrorMessage | string | Error message returned when the call fails. | success |
| Event | string | Event name | finished |
| EventInfo | string | Event description | Model generation event |
| SessionId | string | Session ID | 3cd10828-0e42-471c-8f1a-931cde20b035 |
| TaskId | string | Task ID | d3be9981-ca2d-4e17-bf31-1c0a628e9f99 |
| TraceId | string | Trace ID | 0bc3b4b417362160345997589e5f6e |
| Payload | object | Response body | |
| Output | object | Outputs | |
| Content | string | Question content | Question 1\nQuestion 2\nQuestion 3\n |
| Usage | object | Token usage | |
| InputTokens | long | Number of input tokens used | 100 |
| OutputTokens | long | Number of output tokens | 100 |
| TotalTokens | long | Total number of tokens | 200 |
Examples
Success response
JSON format
{
"RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
"Header": {
"ErrorCode": "RateLimit",
"ErrorMessage": "success",
"Event": "finished",
"EventInfo": "模型生成事件",
"SessionId": "3cd10828-0e42-471c-8f1a-931cde20b035",
"TaskId": "d3be9981-ca2d-4e17-bf31-1c0a628e9f99",
"TraceId": "0bc3b4b417362160345997589e5f6e"
},
"Payload": {
"Output": {
"Content": "问题1\\n问题2\\n问题3\\n"
},
"Usage": {
"InputTokens": 100,
"OutputTokens": 100,
"TotalTokens": 200
}
}
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Please check the workspaceId assignment |
For more error codes, visit Error Center.