RunDocIntroduction - Generate a document reading guide
Generates a reading guide for an article, video, or URL, including a full-text summary, key points, and a chapter overview with segments and their summaries. Supports input and output in multiple languages. If you only need a full-text summary, use RunDocSummary. For more information, see https://help.aliyun.com/en/model-studio/api-aimiaobi-2023-08-01-rundocsummary.
Try it out
You can call this operation in OpenAPI Explorer without calculating a signature. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information for this API operation. You can use this information in the Action element of a RAM policy statement to grant a RAM user or RAM role permission to call the operation. The columns are described as follows:
-
Action: a specific permission.
-
Access level: the access level of an action. Valid values: Write, Read, and List.
-
Resource type: the types of resources for which the action supports authorization:
- Required resource types are marked with an asterisk (*).
- Actions that do not support resource-level authorization use
All resources.
-
Condition key: a condition key defined by the cloud service.
-
Dependent action: an additional permission required to perform the action. The caller must also have permission to perform the dependent action.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunDocIntroduction | get | *All resources * |
| None |
Request syntax
POST /miaodu/stream/runDocIntroduction HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The unique ID of the Alibaba Cloud Model Studio workspace. For more information, see Workspace ID | xxxx |
| DocId | string | Yes | The document ID. | 12345 |
| SessionId | string | Yes | The conversation ID. | a3b5eb35-6b28-4cf9-ac09-1dec25ab4df6 |
| SummaryPrompt | string | No | The custom requirements for the summary. | Output in English |
| KeyPointPrompt | string | No | The custom requirements for key points. | Output in English |
| IntroductionPrompt | string | No | The custom requirements for the reading guide. | Output in English |
| CleanCache | boolean | No | Specifies whether to clear the cache. | true |
| referenceContent | string | No | The content to generate a reading guide for. If this value is not empty, it takes precedence over docId. | The content to generate a reading guide for. |
| ModelName | string | No | The user-defined model name. | quanmiao-max、quanmiao-plus |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| Header | object | The response header. | |
| ErrorCode | string | The error code. | success |
| ErrorMessage | string | The error message. | success |
| Event | string | The event type. | task-started |
| EventInfo | string | The event description. | A model generation event. |
| SessionId | string | The session ID. | 20247a52-23e2-46fb-943d-309cdee2bc6d |
| TaskId | string | The task ID. | 8a9cecb7-6d20-32db-8823-5882c217b647 |
| TraceId | string | The end-to-end trace ID. | 0bd58ea2-dc38-45da-ac02-17f05cb9040b |
| Payload | object | The response body. | |
| Output | object | The output. | |
| Introductions | array<object> | The array of reading guide segments. | |
| introductions | object | ||
| Blocks | array<object> | The array of position information. | |
| blocks | object | The position information. | |
| Height | integer | The height of the text block. | 600 |
| PageId | integer | The page number of the text block. | 10 |
| Width | integer | The width of the text block. | 600 |
| X | integer | The X coordinate of the upper-left corner of the block. | 10 |
| Y | integer | The Y coordinate of the upper-left corner of the block. | 10 |
| BeginTime | long | The segment start time. | 0 |
| EndTime | long | The segment end time. | 1200 |
| StartPageId | integer | The starting page number of multiple text blocks. | 10 |
| Summary | string | The summary of this segment. | The summary content of this segment. |
| Title | string | The title of this segment. | The title content of this segment. |
| KeyPoint | string | The key points. | Key point 1; key point 2; |
| Summary | string | The outline summary. | The outline summary content. |
| Usage | object | The token usage. | |
| InputTokens | long | The number of input tokens. | 100 |
| OutputTokens | long | The number of output tokens. | 100 |
| TotalTokens | long | The total number of tokens. | 200 |
| RequestId | string | The request ID. | C9B5BEA6-E8C4-5861-BE37-D906D516510E |
Examples
Sample success response
JSON format
{
"Header": {
"ErrorCode": "success",
"ErrorMessage": "success",
"Event": "task-started",
"EventInfo": "模型生成事件",
"SessionId": "20247a52-23e2-46fb-943d-309cdee2bc6d",
"TaskId": "8a9cecb7-6d20-32db-8823-5882c217b647",
"TraceId": "0bd58ea2-dc38-45da-ac02-17f05cb9040b"
},
"Payload": {
"Output": {
"Introductions": [
{
"Blocks": [
{
"Height": 600,
"PageId": 10,
"Width": 600,
"X": 10,
"Y": 10,
"BeginTime": 0,
"EndTime": 1200
}
],
"StartPageId": 10,
"Summary": "本段摘要内容",
"Title": "本段标题内容"
}
],
"KeyPoint": "要点1;要点2;",
"Summary": "大纲摘要内容"
},
"Usage": {
"InputTokens": 100,
"OutputTokens": 100,
"TotalTokens": 200
}
},
"RequestId": "C9B5BEA6-E8C4-5861-BE37-D906D516510E"
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Check the value of workspaceId. |
For more error codes, see Error Center.