RunDocSummary - Summarize a document

Updated at:

Generates a full-text summary of an article, video, or URL. Supports input and output in multiple languages.

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 this 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:RunDocSummaryget
*All resources
*
    None
None

Request syntax

POST /miaodu/stream/runDocSummary HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
WorkspaceIdstringYes

The Alibaba Cloud Model Studio workspace ID. For information about how to obtain it, see Use workspaces.

llm-2setzb9x4ewsd
SessionIdstringYes

Conversation ID

0f56f98a-f2d8-47ec-98e9-1cbdcffa9539
DocIdstringNo

Document ID

12345
QuerystringNo

Custom requirements

Summarize this document.
RecommendContentstringNo

The content to summarize

The content to summarize
CleanCachebooleanNo

Specifies whether to clear the current cache

true
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

92e16ccb-92b6-4894-abbf-fc6e2929a0df
TaskIdstring

The task ID

b057f2fa-2277-477b-babf-cbc062307828
TraceIdstring

The end-to-end trace ID

2150451a17191950923411783e2927
Payloadobject

The response body

Outputobject

The output

Contentstring

The summary

The summary
Usageobject

The model token usage

InputTokenslong

The number of input tokens used

100
OutputTokenslong

The number of output tokens

100
TotalTokenslong

The total number of tokens

200
RequestIdstring

The request ID

3259D344-E871-5DE0-8FFE-CDA21F8D4382

Examples

Sample success response

JSON format

{
  "Header": {
    "ErrorCode": "success",
    "ErrorMessage": "success",
    "Event": "task-started",
    "EventInfo": "模型生成事件",
    "SessionId": "92e16ccb-92b6-4894-abbf-fc6e2929a0df",
    "TaskId": "b057f2fa-2277-477b-babf-cbc062307828",
    "TraceId": "2150451a17191950923411783e2927"
  },
  "Payload": {
    "Output": {
      "Content": "总结内容"
    },
    "Usage": {
      "InputTokens": 100,
      "OutputTokens": 100,
      "TotalTokens": 200
    }
  },
  "RequestId": "3259D344-E871-5DE0-8FFE-CDA21F8D4382"
}

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.