Skip to main content

RunCommentGeneration

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 Resources is 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.
ActionAccess levelResource typeCondition keyDependent action
aimiaobi:RunCommentGenerationget
*All Resources
*
    None
None

Request syntax

POST /quanmiao/aimiaobi/runCommentGeneration HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
WorkspaceIdstringYes

Path parameter. The unique identifier of the Alibaba Cloud Model Studio workspace. To obtain it, see Workspace ID

llm-3kcs1w3lltrtbfkr
SessionIdstringNo

Session ID

3f7045e099474ba28ceca1b4eb6d6e21
LengthstringNo

Length of a comment

20
NumCommentsstringYes

Number of comments

10
StylestringNo

Style of the comments

Positive
SourceMaterialstringYes

The article to comment on

PS5 is Sony's next-generation game console, with its innovative...
AllowEmojibooleanNo

Whether emoji are allowed. Default is false

true
TypeobjectYes

Comment type

Valid values of key

  • emotion (emotional expression)
  • opinion (opinion statement)
  • interaction (interactive communication)
  • experience (experience sharing)
  • humor (humorous banter)
{"emotion":"50","opinion":"50"}
SentimentobjectYes

Sentiment

Valid values of key

  • positive (favorable)
  • neutral (neutral)
  • negative (unfavorable)
{"positive":"50","negative":"50"}
LengthRangeobjectYes

Length range

Valid values of key

  • short (within 20 characters)
  • medium (20-50 characters)
  • long (50-100 characters)
{"short":"50","long":“50”}
ExtraInfostringNo

Additional requirements

Do not output any extra information
ModelIdstringNo

Model ID

quanmiao-max、quanmiao-plus

Response parameters

NameTypeDescriptionExample value
object

Schema of Response

RequestIdstring

Id of the request

3f7045e099474ba28ceca1b4eb6d6e21
Endboolean

Whether it has ended

Headerobject

The header of the returned result

Eventstring

Event name

result-generated
EventInfostring

Event description

Nullable
RequestIdstring

RequestId of the request

1813ceee-7fe5-41b4-87e5-982a4d18cca5
SessionIdstring

Session ID

3f7045e099474ba28ceca1b4eb6d6e21
TaskIdstring

Task ID

3f7045e099474ba28ceca1b4eb6d6e21
TraceIdstring

Full-link trace ID

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

Response body

Outputobject

Output

Textstring

Output content

Comment content
Usageobject

Token usage

InputTokenslong

Number of tokens used in the input

1
OutputTokenslong

Number of output tokens

2
TotalTokenslong

Total number of tokens

3

Examples

Success response example JSON format
{
  "RequestId": "3f7045e099474ba28ceca1b4eb6d6e21",
  "End": true,
  "Header": {
    "Event": "result-generated\n",
    "EventInfo": "可空\n",
    "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
    "SessionId": "3f7045e099474ba28ceca1b4eb6d6e21",
    "TaskId": "3f7045e099474ba28ceca1b4eb6d6e21",
    "TraceId": "0bd58ea2-dc38-45da-ac02-17f05cb9040b"
  },
  "Payload": {
    "Output": {
      "Text": "评论内容"
    },
    "Usage": {
      "InputTokens": 1,
      "OutputTokens": 2,
      "TotalTokens": 3
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action.Check the assignment of workspaceId
Visit the Error Center to view more error codes.