analyze_sentiment
Analyze sentiment and trend patterns in news articles to understand public opinion and topic popularity across platforms.
Instructions
分析新闻的情感倾向和热度趋势
建议:使用自然语言日期时,先调用 resolve_date_range 获取精确日期范围。
Args: topic: 话题关键词(可选) platforms: 平台ID列表,如 ['zhihu', 'weibo'],不指定则使用所有平台 date_range: 日期范围,格式 {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"},默认今天 limit: 返回新闻数量,默认50,最大100(会对标题去重) sort_by_weight: 是否按热度权重排序,默认True include_url: 是否包含URL链接,默认False(节省token)
Returns: JSON格式的分析结果,包含情感分布、热度趋势和相关新闻
Examples: - analyze_sentiment(topic="AI", date_range={"start": "2025-01-01", "end": "2025-01-07"})
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | ||
| platforms | No | ||
| date_range | No | ||
| limit | No | ||
| sort_by_weight | No | ||
| include_url | No |