RunDocSummary - Summarize a document
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.
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:RunDocSummary | get | *All resources | None | None |
Request syntax
POST /miaodu/stream/runDocSummary HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
WorkspaceId | string | Yes | The Alibaba Cloud Model Studio workspace ID. For information about how to obtain it, see Use workspaces. | llm-2setzb9x4ewsd |
SessionId | string | Yes | The conversation ID. | 0f56f98a-f2d8-47ec-98e9-1cbdcffa9539 |
DocId | string | No | The document ID. | 12345 |
Query | string | No | The custom requirements. | Summarize this document. |
RecommendContent | string | No | The content to summarize. | The content to summarize. |
CleanCache | boolean | No | Specifies whether to clear the current cache. | true |
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. | 92e16ccb-92b6-4894-abbf-fc6e2929a0df |
TaskId | string | The task ID. | b057f2fa-2277-477b-babf-cbc062307828 |
TraceId | string | The end-to-end trace ID. | 2150451a17191950923411783e2927 |
Payload | object | The response body. | |
Output | object | The output. | |
Content | string | The summary. | The summary. |
Usage | object | The model token usage. | |
InputTokens | long | The number of input tokens used. | 100 |
OutputTokens | long | The number of output tokens. | 100 |
TotalTokens | long | The total number of tokens. | 200 |
RequestId | string | 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 code | The error code. | The 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.