RunHotword
Extract keywords from a specified document. Keywords are domain-specific professional terms or concepts that represent and identify a particular industry or field. They accurately describe and summarize the core content, key people, major events, or technical terms in that domain.
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.
Authorization information
The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:
-
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 in the operation. For more information, see the following:
- Required resource types are marked with a leading *.
- 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 have the permissions of the dependent actions at the same time for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunHotword | get | *All resources * |
| None |
Request syntax
POST /miaodu/stream/runHotword HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| WorkspaceId | string | Yes | Unique identifier of the Alibaba Cloud Model Studio workspace. For more information, see Workspace ID | llm-baw8as25ll3wnzjr |
| SessionId | string | No | Session ID. | e32a1a3f-1f7e-41dd-b888-ef1d91b96d1e |
| DocId | string | No | Document ID. | 84ufBYEeLMZOjRFo84HJ7ySL3Efr55 |
| Prompt | string | No | Prompt. | Prompt |
| ReferenceContent | string | No | The document content to extract hotwords from. If this parameter is not empty, hotwords are extracted from this content. If it is empty, hotwords are extracted based on the DocId. | Reference content |
| ModelName | string | No | Custom model name. | quanmiao-max, quanmiao-plus |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | 1813ceee-7fe5-41b4-87e5-982a4d18cca5 |
| Header | object | Response header. | |
| ErrorCode | string | Error code. | 200 |
| ErrorMessage | string | Error message. | success |
| Event | string | Event type. | finished |
| EventInfo | string | Event description. | Model generation event |
| SessionId | string | Session ID. | 92e16ccb-92b6-4894-abbf-fc6e2929a0df |
| TaskId | string | Task ID. | 3f7045e099474ba28ceca1b4eb6d6e21 |
| TraceId | string | Trace ID. | 0abb7e3217356108993888059ee72b |
| Payload | object | Response body. | |
| Output | object | Output. | |
| Content | string | Hotword content. | Global influence,Cultural exchange,Sun Wukong,Animation adaptation |
| Usage | object | Token usage. | |
| InputTokens | long | Number of input tokens. | 100 |
| OutputTokens | long | Number of output tokens. | 1 |
| TotalTokens | long | Total number of tokens. | 101 |
Examples
Success response
JSON format
{
"RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
"Header": {
"ErrorCode": 200,
"ErrorMessage": "success",
"Event": "finished",
"EventInfo": "模型生成事件",
"SessionId": "92e16ccb-92b6-4894-abbf-fc6e2929a0df",
"TaskId": "3f7045e099474ba28ceca1b4eb6d6e21",
"TraceId": "0abb7e3217356108993888059ee72b"
},
"Payload": {
"Output": {
"Content": "全球影响,文化交流,孙悟空,动画改编"
},
"Usage": {
"InputTokens": 100,
"OutputTokens": 1,
"TotalTokens": 101
}
}
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Check the workspaceId value. |
See the Error Center for more error codes.