GenerateBroadcastNews

Updated at:

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.

Try it

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.

OperationAccess levelResource typeCondition keyDependent action
quanmiaolightapp:GenerateBroadcastNewsnone
*All Resources
*
    None
None

Request syntax

POST /{workspaceId}/quanmiao/lightapp/GenerateBroadcastNews HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYesllm-xxx
promptstringYes

User intent

Broadcast sports news for me

Response parameters

NameTypeDescriptionExample value
object

Schema of Response

codestring

Status code

xx
dataobject

Categorization and hot topic data

hotTopicSummariesarray<object>

List of hot topic data

hotTopicSummariesobject

Hot topic data

categorystring

Hot topic category

Sports
hotTopicstring

Hot topic name

Hot topic
hotTopicVersionstring

Hot topic version

2024-09-13_08
hotValuedouble

Hotness score

1000000
idstring

Hot topic ID

1458tb3bjo7531kap42a
imagesarray<object>

List of related images

imagesobject

Related image

urlstring

Image URL

http://xxx.com/xxx.jpeg
textSummarystring

Text summary of the hot topic

xxx
sessionIdstring

Conversation ID

2bb0ea82dafd48a8817fadc4c90e2b52
taskIdstring

Task ID

3feb69ed02d9b1a17d0f1a942675d300
textstring

Parsed result

Sports
usageobject

Token usage

inputTokenslong

Number of input tokens

1
outputTokenslong

Number of output tokens

2
totalTokenslong

Total number of tokens

3
httpStatusCodeinteger

HTTP status code

200
messagestring

Error message

success
requestIdstring

Unique request ID

117F5ABE-CF02-5502-9A3F-E56BC9081A64
successboolean

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.