GenerateBroadcastNews
Alibaba Cloud Model Studio lightweight app — Enables in-vehicle systems and content platforms to interact with news hotlists. Recommends a single trending topic for broadcast by understanding user intent and retrieving the hot topics list for the corresponding channel.
Operation description
This API understands user intent and retrieves the hot topics list for the corresponding channel, for example, "Broadcast sports news." This is a legacy API. We recommend that you use the hot topic (hotlist) Q&A API RunHotTopicChat, which fully covers the capabilities of this API.
You are welcome to try it in the console.
For information about calling this API by using SDKs, see the Java and Python examples under "API" in the console.
Try it now
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.
Authorization information
The following table describes the authorization information of the 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:
-
Operation: 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. Details are as follows:
- For required resource types, an asterisk (*) is prefixed.
- 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: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| quanmiaolightapp:GenerateBroadcastNews | none | *All Resources * |
| None |
Request syntax
POST /{workspaceId}/quanmiao/lightapp/GenerateBroadcastNews HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | llm-xxx | |
| prompt | string | Yes | User intent | Broadcast sports news for me |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| code | string | Status code | xx |
| data | object | Categorization and hot topic data | |
| hotTopicSummaries | array<object> | List of hot topic data | |
| hotTopicSummaries | object | Hot topic data | |
| category | string | Hot topic category | Sports |
| hotTopic | string | Hot topic name | Hot topic |
| hotTopicVersion | string | Hot topic version | 2024-09-13_08 |
| hotValue | double | Hotness score | 1000000 |
| id | string | Hot topic ID | 1458tb3bjo7531kap42a |
| images | array<object> | List of related images | |
| images | object | Related image | |
| url | string | Image URL | http://xxx.com/xxx.jpeg |
| textSummary | string | Text summary of the hot topic | xxx |
| sessionId | string | Conversation ID | 2bb0ea82dafd48a8817fadc4c90e2b52 |
| taskId | string | Task ID | 3feb69ed02d9b1a17d0f1a942675d300 |
| text | string | Parsed result | Sports |
| usage | object | Token usage | |
| inputTokens | long | Number of input tokens | 1 |
| outputTokens | long | Number of output tokens | 2 |
| totalTokens | long | Total number of tokens | 3 |
| httpStatusCode | integer | HTTP status code | 200 |
| message | string | Error message | success |
| requestId | string | Unique request ID | 117F5ABE-CF02-5502-9A3F-E56BC9081A64 |
| success | boolean | Operation status: true indicates success and false indicates failure. | True |
Examples
Success response
JSON format
{
"code": "xx",
"data": {
"hotTopicSummaries": [
{
"category": "体育",
"hotTopic": "热点",
"hotTopicVersion": "2024-09-13_08",
"hotValue": 1000000,
"id": "1458tb3bjo7531kap42a",
"images": [
{
"url": "http://xxx.com/xxx.jpeg"
}
],
"textSummary": "xxx"
}
],
"sessionId": "2bb0ea82dafd48a8817fadc4c90e2b52",
"taskId": "3feb69ed02d9b1a17d0f1a942675d300",
"text": "体育",
"usage": {
"inputTokens": 1,
"outputTokens": 2,
"totalTokens": 3
}
},
"httpStatusCode": 200,
"message": "success",
"requestId": "117F5ABE-CF02-5502-9A3F-E56BC9081A64",
"success": true
}
Error codes
See Error Center for more error codes.