RunHotTopicChat

Updated at:

Alibaba Cloud Model Studio lightweight application — Enables in-vehicle systems and content platforms to interact with news hot topics — Broadcast list (hot topics) Q&A: Ask questions about broadcast lists, news, and open-domain content.

Operation description

About the RunHotTopicChat API

Use this API to ask questions about broadcast lists (hot topics), hot topic news, and open-domain content, including channel recommendations, hot topic recommendations, and hot topic content Q&A.

Try it in the console.

To call this API using an SDK, see the Java and Python examples on the API tab in the console. To call this API using an SDK, see the Java and Python examples on the API tab in the console. To call this API using an SDK, see the Java and Python examples on the API tab in the console.

Full API reference for news hot topic interaction

API list

In the AI Miaobi SDK: alibabacloud-aimiaobi20230801

  • GetHotTopicBroadcast - Query the full broadcast list (hot topics) --Commonly used
  • SubmitCustomHotTopicBroadcastJob - Submit a custom broadcast list job
  • GetCustomHotTopicBroadcastJob - Retrieve the result of a custom broadcast list job

In the Alibaba Cloud Model Studio Quanmiao Lightweight Application SDK: alibabacloud-quanmiaolightapp20240801

  • RunHotTopicChat - Q&A for broadcast lists (hot topics) --Commonly used
  • RunHotTopicSummary - Generate a custom summary for broadcast list hot topics

Use cases

Use case 1: Retrieve all or selected channel hot topics from a full broadcast list (hot topics)

  • GetHotTopicBroadcast - Query a broadcast list

Use case 2: Ask questions about a broadcast list or general topics

  • RunHotTopicChat - Q&A

Use case 3: Customize a broadcast list (channels, custom summaries, etc.) when the built-in broadcast list (hot topics) does not meet your needs

  • SubmitCustomHotTopicBroadcastJob - Submit a custom broadcast list job
  • GetCustomHotTopicBroadcastJob - Poll the status of a custom broadcast list job
  • GetHotTopicBroadcast - Retrieve details of a custom broadcast list

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

RAM authorization

The following table describes the authorization information for this API. You can use the Action element of RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details:

  • 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 for the operation. Details:

    • Required resource types are marked with a preceding 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 have all dependent action permissions for the operation to succeed.

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

Request syntax

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

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

Unique identifier of the Alibaba Cloud Model Studio workspace: Get workspaceId

llm-xx
modelIdstringNo

Data model ID. Default: qwen-max-latest

qwen-max-latest
modelCustomPromptTemplatestringNo

Prompt template

xx
generateOptionsarrayNo

List of generation modes. Default: textChatGenerate

stringNo

Generation mode: summaryChatGenerate and newsChatGenerate correspond to the two options in step three of the console and can be used directly. For other scenarios, combine them as needed:

  • Capability combinations: predefined combinations of atomic capabilities plus search sources
    • summaryChatGenerate: answers only from information already contained in the aggregated news broadcast list, including categoryRecommend, hotTopicSummarySearch, and textChatGenerate
    • newsChatGenerate: answers after searching the original news material and the open Internet, including hotTopicNewsSearch, internetSearch, and textChatGenerate
  • Atomic capabilities:
    • categoryRecommend: recommends channel hot topics, for example, "Recommend some sports news"
    • textChatGenerate: Q&A. When this is the only option, you must explicitly specify a source: internetSearch, hotTopicSummarySearch, or hotTopicNewsSearch, for example, "When did the xxx event happen"
    • queryRecommend: enables query recommendations, returned in a separate structure
  • Search sources:
    • hotTopicSummarySearch: search source for hot topic summaries
    • hotTopicNewsSearch: search source for hot topic news details
    • internetSearch: general Internet search source
newsChatGenerate
taskIdstringNo

Unique identifier of the conversation task. Keep this value unchanged across multiple turns.

a3d1c2ac-f086-4a21-9069-f5631542f5a2
originalSessionIdstringNo

Unique identifier of the original session. Used for retry scenarios.

a3d1c2ac-f086-4a21-9069-f5631542f5ax
promptstringNo

User question

Broadcast sports news for me
hotTopicVersionstringNo

Hot topic version

2024-09-13_12
categorystringNo

Hot topic channel

Sports
hotTopicsarrayNo

List of hot topic names

stringNo

Hot topic title

xxx
imageCountintegerNo

Number of images. Not all responses include images. Valid values: [1-3]

1
stepForBroadcastContentConfigobjectNo

News broadcast content configuration. For SaaS only. PaaS users should use hotTopicVersion instead.

categoriesarrayNo

List of selected channels

stringNo

Channel

Sports
customHotValueWeightsarray<object>No

Dimensions for calculating hotness. If omitted, default weights apply.

objectNo

List of hotness calculation dimensions

dimensionstringNo

Unique identifier of the weight dimension:

  • views ("page views")
  • comments ("number of comments")
  • ups ("likes")
  • downs ("dislikes")
  • publishTime ("publish time")
comments
weightintegerNo

Weight. Range: 0-10

1
topicCountintegerNo

Number of topics

20
messagesarray<object>No

Context

objectNo

Role: user, assistant, or system

rolestringNo

Content

user
contentstringNo

Time of occurrence

xxx
createTimestringNo

Time

2024-12-10 18:51:29

Response elements

NameTypeDescriptionExample value
object

Schema of Response

headerobject

Message header

errorCodestring

Error code

InvalidParam
errorMessagestring

Error description

xx
eventstring

Event

task-finished
eventInfostring

Event description

xx
sessionIdstring

Unique identifier of the session

xxx
taskIdstring

Unique identifier of the task

d3be9981-ca2d-4e17-bf31-1c0a628e9f99
traceIdstring

Unique identifier of the full trace

2150451a17191950923411783e2927
payloadobject

Message body

outputobject

Output result

articlesarray<object>

List of reference content

object

Content list

contentstring

Main content

xxx
pubTimestring

Publish time

2024-09-22 16:45:06
scoredouble

Relevance

0.8
searchSourceNamestring

Name of the article source

Internet
selectboolean

Whether referenced

true
summarystring

Summary

xx
titlestring

Title

test
urlstring

URL

http://xxx
hotTopicSummariesarray<object>

List of hot topics

object

Hot topic

customHotValuedouble

Custom hotness value

100000
hotTopicstring

Hot topic name

xx
hotTopicVersionstring

Hot topic summary version

2024-09-13_08
hotValuedouble

Hotness value

100000
textSummarystring

Text summary of the hot topic

xxx
customTextSummarystring

Custom text summary of the hot topic

xxx
newsarray<object>

News list

object

News

titlestring

Title

xxx
urlstring

url

http://xxx
imagesarray<object>

Image list

object

Image

urlstring

Image

http://www.example.com/xxx.png
urlstring

URL of the hot topic

http://www.example.com/xxx.html
pubTimestring

Publish time of the hot topic

2025-05-20 12:00:00
multimodalMediasarray<object>

Supplementary images

object

Supplementary image

fileUrlstring

URL

http://xxxx
mediaTypestring

Type:

  • image: Image
image
sortScoredouble

Relevance

0.8
recommendQueriesarray

List of recommended queries

string

Recommended query

What's your opinion on xx?
searchQuerystring

Rewritten query

xxx
textstring

Generated content, such as answers

xx
categorystring

Domain identification for news broadcast scenarios (channel identification such as politics, society, and international)

International
keywordstring

Keyword identification for news broadcast scenarios

AI
locationstring

Location identification for news broadcast scenarios

Hangzhou
usageobject

Token usage

inputTokenslong

Input tokens

100
outputTokenslong

Output tokens

100
totalTokenslong

Total tokens

200
requestIdstring

Unique identifier of the request

04DA1A52-4E51-56CB-BA64-FDDA0B53BAE8

Examples

Success response

JSON format

{
  "header": {
    "errorCode": "InvalidParam",
    "errorMessage": "xx",
    "event": "task-finished",
    "eventInfo": "xx",
    "sessionId": "xxx",
    "taskId": "d3be9981-ca2d-4e17-bf31-1c0a628e9f99",
    "traceId": "2150451a17191950923411783e2927"
  },
  "payload": {
    "output": {
      "articles": [
        {
          "content": "xxx",
          "pubTime": "2024-09-22 16:45:06",
          "score": 0.8,
          "searchSourceName": "互联网",
          "select": true,
          "summary": "xx",
          "title": "test",
          "url": "http://xxx"
        }
      ],
      "hotTopicSummaries": [
        {
          "customHotValue": 100000,
          "hotTopic": "xx",
          "hotTopicVersion": "2024-09-13_08",
          "hotValue": 100000,
          "textSummary": "xxx",
          "customTextSummary": "xxx",
          "news": [
            {
              "title": "xxx",
              "url": "http://xxx"
            }
          ],
          "images": [
            {
              "url": "http://www.example.com/xxx.png"
            }
          ],
          "url": "http://www.example.com/xxx.html",
          "pubTime": "2025-05-20 12:00:00"
        }
      ],
      "multimodalMedias": [
        {
          "fileUrl": "http://xxxx",
          "mediaType": "image",
          "sortScore": 0.8
        }
      ],
      "recommendQueries": [
        "关于xx你有什么看法?"
      ],
      "searchQuery": "xxx",
      "text": "xx",
      "category": "国际",
      "keyword": "AI",
      "location": "杭州"
    },
    "usage": {
      "inputTokens": 100,
      "outputTokens": 100,
      "totalTokens": 200
    }
  },
  "requestId": "04DA1A52-4E51-56CB-BA64-FDDA0B53BAE8"
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action , Please check the assignment of the workspaceId.Check the workspaceId assignment.

For more error codes, visit Error Center.

Change history

Change timeChange summaryOperation

No change history yet