Predicts user comments for a specified article.
Debug
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
Authorization information
The following table describes the authorization information for this API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization for the operation. Details are as follows:
- Required resource types are marked with a leading asterisk (*).
- For operations that do not support resource-level authorization,
All Resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent action: the other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunCommentGeneration | get | *All Resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| WorkspaceId | string | Yes | Path parameter. The unique identifier of the Alibaba Cloud Model Studio workspace. To obtain it, see Workspace ID | llm-3kcs1w3lltrtbfkr |
| SessionId | string | No | Session ID | 3f7045e099474ba28ceca1b4eb6d6e21 |
| Length | string | No | Length of a comment | 20 |
| NumComments | string | Yes | Number of comments | 10 |
| Style | string | No | Style of the comments | Positive |
| SourceMaterial | string | Yes | The article to comment on | PS5 is Sony's next-generation game console, with its innovative... |
| AllowEmoji | boolean | No | Whether emoji are allowed. Default is false | true |
| Type | object | Yes | Comment type Valid values of key
| {"emotion":"50","opinion":"50"} |
| Sentiment | object | Yes | Sentiment Valid values of key
| {"positive":"50","negative":"50"} |
| LengthRange | object | Yes | Length range Valid values of key
| {"short":"50","long":“50”} |
| ExtraInfo | string | No | Additional requirements | Do not output any extra information |
| ModelId | string | No | Model ID | quanmiao-max、quanmiao-plus |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | 3f7045e099474ba28ceca1b4eb6d6e21 |
| End | boolean | Whether it has ended | |
| Header | object | The header of the returned result | |
| Event | string | Event name | result-generated |
| EventInfo | string | Event description | Nullable |
| RequestId | string | RequestId of the request | 1813ceee-7fe5-41b4-87e5-982a4d18cca5 |
| SessionId | string | Session ID | 3f7045e099474ba28ceca1b4eb6d6e21 |
| TaskId | string | Task ID | 3f7045e099474ba28ceca1b4eb6d6e21 |
| TraceId | string | Full-link trace ID | 0bd58ea2-dc38-45da-ac02-17f05cb9040b |
| Payload | object | Response body | |
| Output | object | Output | |
| Text | string | Output content | Comment content |
| Usage | object | Token usage | |
| InputTokens | long | Number of tokens used in the input | 1 |
| OutputTokens | long | Number of output tokens | 2 |
| TotalTokens | long | Total number of tokens | 3 |
Examples
Success response example
JSON format
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Check the assignment of workspaceId |