RunDocIntroduction - Generate a document reading guide

Updated at:

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.

Try it out

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.

ActionAccess levelResource typeCondition keyDependent action
aimiaobi:RunDocIntroductionget
*All resources
*
    None
None

Request syntax

POST /miaodu/stream/runDocIntroduction HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
WorkspaceIdstringYes

The unique ID of the Alibaba Cloud Model Studio workspace. For more information, see Workspace ID

xxxx
DocIdstringYes

The document ID.

12345
SessionIdstringYes

The conversation ID.

a3b5eb35-6b28-4cf9-ac09-1dec25ab4df6
SummaryPromptstringNo

The custom requirements for the summary.

Output in English
KeyPointPromptstringNo

The custom requirements for key points.

Output in English
IntroductionPromptstringNo

The custom requirements for the reading guide.

Output in English
CleanCachebooleanNo

Specifies whether to clear the cache.

true
referenceContentstringNo

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

The user-defined model name.

quanmiao-max、quanmiao-plus

Response parameters

NameTypeDescriptionExample
object

Schema of Response

Headerobject

The response header.

ErrorCodestring

The error code.

success
ErrorMessagestring

The error message.

success
Eventstring

The event type.

task-started
EventInfostring

The event description.

A model generation event.
SessionIdstring

The session ID.

20247a52-23e2-46fb-943d-309cdee2bc6d
TaskIdstring

The task ID.

8a9cecb7-6d20-32db-8823-5882c217b647
TraceIdstring

The end-to-end trace ID.

0bd58ea2-dc38-45da-ac02-17f05cb9040b
Payloadobject

The response body.

Outputobject

The output.

Introductionsarray<object>

The array of reading guide segments.

introductionsobject
Blocksarray<object>

The array of position information.

blocksobject

The position information.

Heightinteger

The height of the text block.

600
PageIdinteger

The page number of the text block.

10
Widthinteger

The width of the text block.

600
Xinteger

The X coordinate of the upper-left corner of the block.

10
Yinteger

The Y coordinate of the upper-left corner of the block.

10
BeginTimelong

The segment start time.

0
EndTimelong

The segment end time.

1200
StartPageIdinteger

The starting page number of multiple text blocks.

10
Summarystring

The summary of this segment.

The summary content of this segment.
Titlestring

The title of this segment.

The title content of this segment.
KeyPointstring

The key points.

Key point 1; key point 2;
Summarystring

The outline summary.

The outline summary content.
Usageobject

The token usage.

InputTokenslong

The number of input tokens.

100
OutputTokenslong

The number of output tokens.

100
TotalTokenslong

The total number of tokens.

200
RequestIdstring

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 codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action.Check the value of workspaceId.

For more error codes, see Error Center.