RunHotTopicChat
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.
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 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 all dependent action permissions for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| quanmiaolightapp:RunHotTopicChat | none | *All Resources * |
| None |
Request syntax
POST /{workspaceId}/quanmiao/lightapp/runHotTopicChat HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | Unique identifier of the Alibaba Cloud Model Studio workspace: Get workspaceId | llm-xx |
| modelId | string | No | Data model ID. Default: qwen-max-latest | qwen-max-latest |
| modelCustomPromptTemplate | string | No | Prompt template | xx |
| generateOptions | array | No | List of generation modes. Default: textChatGenerate | |
| string | No | 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:
| newsChatGenerate | |
| taskId | string | No | Unique identifier of the conversation task. Keep this value unchanged across multiple turns. | a3d1c2ac-f086-4a21-9069-f5631542f5a2 |
| originalSessionId | string | No | Unique identifier of the original session. Used for retry scenarios. | a3d1c2ac-f086-4a21-9069-f5631542f5ax |
| prompt | string | No | User question | Broadcast sports news for me |
| hotTopicVersion | string | No | Hot topic version | 2024-09-13_12 |
| category | string | No | Hot topic channel | Sports |
| hotTopics | array | No | List of hot topic names | |
| string | No | Hot topic title | xxx | |
| imageCount | integer | No | Number of images. Not all responses include images. Valid values: [1-3] | 1 |
| stepForBroadcastContentConfig | object | No | News broadcast content configuration. For SaaS only. PaaS users should use hotTopicVersion instead. | |
| categories | array | No | List of selected channels | |
| string | No | Channel | Sports | |
| customHotValueWeights | array<object> | No | Dimensions for calculating hotness. If omitted, default weights apply. | |
| object | No | List of hotness calculation dimensions | ||
| dimension | string | No | Unique identifier of the weight dimension:
| comments |
| weight | integer | No | Weight. Range: 0-10 | 1 |
| topicCount | integer | No | Number of topics | 20 |
| messages | array<object> | No | Context | |
| object | No | Role: user, assistant, or system | ||
| role | string | No | Content | user |
| content | string | No | Time of occurrence | xxx |
| createTime | string | No | Time | 2024-12-10 18:51:29 |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| header | object | Message header | |
| errorCode | string | Error code | InvalidParam |
| errorMessage | string | Error description | xx |
| event | string | Event | task-finished |
| eventInfo | string | Event description | xx |
| sessionId | string | Unique identifier of the session | xxx |
| taskId | string | Unique identifier of the task | d3be9981-ca2d-4e17-bf31-1c0a628e9f99 |
| traceId | string | Unique identifier of the full trace | 2150451a17191950923411783e2927 |
| payload | object | Message body | |
| output | object | Output result | |
| articles | array<object> | List of reference content | |
| object | Content list | ||
| content | string | Main content | xxx |
| pubTime | string | Publish time | 2024-09-22 16:45:06 |
| score | double | Relevance | 0.8 |
| searchSourceName | string | Name of the article source | Internet |
| select | boolean | Whether referenced | true |
| summary | string | Summary | xx |
| title | string | Title | test |
| url | string | URL | http://xxx |
| hotTopicSummaries | array<object> | List of hot topics | |
| object | Hot topic | ||
| customHotValue | double | Custom hotness value | 100000 |
| hotTopic | string | Hot topic name | xx |
| hotTopicVersion | string | Hot topic summary version | 2024-09-13_08 |
| hotValue | double | Hotness value | 100000 |
| textSummary | string | Text summary of the hot topic | xxx |
| customTextSummary | string | Custom text summary of the hot topic | xxx |
| news | array<object> | News list | |
| object | News | ||
| title | string | Title | xxx |
| url | string | url | http://xxx |
| images | array<object> | Image list | |
| object | Image | ||
| url | string | Image | http://www.example.com/xxx.png |
| url | string | URL of the hot topic | http://www.example.com/xxx.html |
| pubTime | string | Publish time of the hot topic | 2025-05-20 12:00:00 |
| multimodalMedias | array<object> | Supplementary images | |
| object | Supplementary image | ||
| fileUrl | string | URL | http://xxxx |
| mediaType | string | Type:
| image |
| sortScore | double | Relevance | 0.8 |
| recommendQueries | array | List of recommended queries | |
| string | Recommended query | What's your opinion on xx? | |
| searchQuery | string | Rewritten query | xxx |
| text | string | Generated content, such as answers | xx |
| category | string | Domain identification for news broadcast scenarios (channel identification such as politics, society, and international) | International |
| keyword | string | Keyword identification for news broadcast scenarios | AI |
| location | string | Location identification for news broadcast scenarios | Hangzhou |
| usage | object | Token usage | |
| inputTokens | long | Input tokens | 100 |
| outputTokens | long | Output tokens | 100 |
| totalTokens | long | Total tokens | 200 |
| requestId | string | 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 code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You 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 time | Change summary | Operation |
|---|
No change history yet