初始化
This commit is contained in:
1 parent
34474bd5fc
commit
b638b541d0
3008 files changed
+837699
No files matched your search
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: sentiment-analysis
|
||||
description: 调用外部舆情分析 AG-UI 网关,实时解析思考与正文流,并输出统一 NDJSON 或 Markdown 结果。
|
||||
license: Proprietary
|
||||
version: 1.0.0
|
||||
allowed-tools:
|
||||
- bash
|
||||
---
|
||||
|
||||
# 舆情分析
|
||||
|
||||
当用户需要研判新闻事件、社会热点、品牌声誉、风险传播或某一主题的舆情态势时,使用本技能调用已配置的外部舆情分析服务。
|
||||
|
||||
## 执行规则
|
||||
|
||||
1. 必须实际执行本技能目录中的 `scripts/sentiment_stream.py`,不要根据常识虚构分析结果。
|
||||
2. 默认使用 `--format markdown`,将脚本最终输出原样或经简短整理后回复用户。
|
||||
3. 当调用方需要消费实时增量时,使用 `--format ndjson`。每行都是一个 JSON 事件,可直接按 `type` 渲染:
|
||||
- `thinking_delta`:思考文本增量;
|
||||
- `answer_delta`:正文文本增量;
|
||||
- `done`:完整结果;
|
||||
- `error`:调用失败。
|
||||
4. 只有在用户明确需要结合上一轮结果时,才通过 `--messages-file` 传入历史消息。历史文件必须是 JSON 数组,元素为 `{role, id, content}`。
|
||||
5. 不得在回答、日志或产物中输出接口配置中的用户名、密码或 Authorization 请求头。
|
||||
|
||||
## 调用命令
|
||||
|
||||
在技能运行目录执行:
|
||||
|
||||
```bash
|
||||
python scripts/sentiment_stream.py --question "请分析某主题近期的舆情态势" --format markdown
|
||||
```
|
||||
|
||||
需要给调用方提供可实时消费的标准化流时:
|
||||
|
||||
```bash
|
||||
python scripts/sentiment_stream.py --question "请分析某主题近期的舆情态势" --format ndjson
|
||||
```
|
||||
|
||||
完整安装、鉴权配置、历史消息和事件格式见 `docs/调用与安装说明.md`。
|
||||
Reference in new issue
Block a user