RunDocSmartCard
Automatically adds tags to selected text or a specified chat and generates a smart card note.
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.
RAM authorization
The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. Details are as follows:
-
Action: refers to the specific permission point.
-
Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: refers to the resource types that support authorization in the operation. Details are as follows:
- For required resource types, an asterisk (*) is prefixed.
- For operations that do not support resource-level authorization,
全部资源is used.
-
Condition key: refers to the condition keys defined by the cloud service itself.
-
Dependent action: refers to the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunDocSmartCard | get | *All resources * |
| None |
Request syntax
POST /miaodu/stream/runDocSmartCard HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The unique ID of the Alibaba Cloud Model Studio workspace. For more information, see Get a Workspace ID. | llm-2setzb9x4ewsd |
| DocId | string | Yes | The document ID. | 84ufBYEeLMZOjRFo84HJ7ySL3Efr55 |
| SessionId | string | Yes | The session ID. | 3f7045e099474ba28ceca1b4eb6d6e21 |
| Prompt | string | No | The prompt. | Custom prompt |
| ModelName | string | No | The name of the custom model. | quanmiao-max, quanmiao-plus |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | 1813ceee-7fe5-41b4-87e5-982a4d18cca5 |
| Header | object | The response header. | |
| ErrorCode | string | The error code. | success |
| ErrorMessage | string | The error message. | success |
| Event | string | The event type. | finished |
| EventInfo | string | The event description. | Model generation event |
| SessionId | string | The unique ID of the session. | 07181f55-2311-48af-8048-132a77dee020 |
| TaskId | string | The task ID. | 8d55b429d7c6d321fcff54823e8d317b |
| TraceId | string | The trace ID. | 0abb781c17337107444473701ed7c3 |
| Payload | object | The response body. | |
| Output | object | Output content object. | |
| Content | string | Card title. | Card title content |
| Tags | array | Card tag array. | |
| tags | string | Card tag. | Card tag content |
| Usage | object | Token usage. | |
| InputTokens | long | Number of input tokens. | 1 |
| OutputTokens | long | Number of output tokens. | 100 |
| TotalTokens | long | Total number of tokens. | 101 |
Examples
Success response
JSON format
{
"RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
"Header": {
"ErrorCode": "success",
"ErrorMessage": "success",
"Event": "finished",
"EventInfo": "模型生成事件",
"SessionId": "07181f55-2311-48af-8048-132a77dee020",
"TaskId": "8d55b429d7c6d321fcff54823e8d317b",
"TraceId": "0abb781c17337107444473701ed7c3"
},
"Payload": {
"Output": {
"Content": "标题内容",
"Tags": [
"标签内容"
]
},
"Usage": {
"InputTokens": 1,
"OutputTokens": 100,
"TotalTokens": 101
}
}
}
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 |
See Error codes for a complete list.