@9000ai/cli 0.6.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/content.d.ts +2 -0
- package/dist/commands/content.js +66 -0
- package/dist/commands/feedback.js +4 -1
- package/dist/commands/init.js +14 -6
- package/dist/commands/monitor.js +7 -4
- package/dist/commands/search.js +2 -2
- package/dist/commands/task.js +5 -3
- package/dist/index.js +2 -0
- package/package.json +1 -1
- package/skills/9000AI-hub/SKILL.md +14 -1
- package/skills/9000AI-hub/init/templates/agents/content-agent.md +163 -35
- package/skills/9000AI-hub/init/templates/assets/README.md +56 -0
- package/skills/9000AI-hub/init/templates/assets/catalog.json +1 -0
- package/skills/9000AI-hub/init/templates/benchmarks/README.md +56 -11
- package/skills/9000AI-hub/init/templates/benchmarks/index.json +1 -0
- package/skills/9000AI-hub/init/templates/claims/README.md +5 -2
- package/skills/9000AI-hub/init/templates/guide.md +55 -27
- package/skills/9000AI-hub/init/templates/workflows/README.md +26 -0
- package/skills/content-processing/SKILL.md +119 -0
- package/skills/content-processing/references/endpoints.md +72 -0
- package/skills/douyin-topic-discovery/SKILL.md +29 -125
|
@@ -1,25 +1,70 @@
|
|
|
1
1
|
# 对标文案库
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
这个目录存放从对标账号转写、拆解的文案素材。是你的内容弹药库,AI 做选题时会检索这里。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 工作流
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```
|
|
8
|
+
搜索/监控 → 发现好内容 → 转写 → 拆解分析 → 存到 benchmarks/主题/
|
|
9
|
+
↓
|
|
10
|
+
自动更新 index.json
|
|
11
|
+
↓
|
|
12
|
+
下次做选题时 AI 按标签检索
|
|
13
|
+
```
|
|
10
14
|
|
|
11
|
-
##
|
|
15
|
+
## 目录结构
|
|
12
16
|
|
|
13
17
|
```
|
|
14
18
|
benchmarks/
|
|
15
|
-
├── AI
|
|
16
|
-
|
|
17
|
-
│
|
|
19
|
+
├── index.json ← AI 检索入口,存素材索引
|
|
20
|
+
├── AI就业/
|
|
21
|
+
│ ├── 一鸣财经_中国教育的三大魔幻现象.md
|
|
22
|
+
│ └── 张三说_AI替代了哪些工作.md
|
|
18
23
|
├── 知识付费/
|
|
19
|
-
│ └── 李四_如何做知识付费.
|
|
24
|
+
│ └── 李四_如何做知识付费.md
|
|
20
25
|
└── README.md
|
|
21
26
|
```
|
|
22
27
|
|
|
28
|
+
## index.json 格式
|
|
29
|
+
|
|
30
|
+
每次存入新素材时,AI 必须同步更新 index.json:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
[
|
|
34
|
+
{
|
|
35
|
+
"id": "bm001",
|
|
36
|
+
"topic": "AI就业",
|
|
37
|
+
"title": "一鸣财经讲中国教育的三大魔幻现象",
|
|
38
|
+
"type": "transcription",
|
|
39
|
+
"file": "AI就业/一鸣财经_中国教育的三大魔幻现象.md",
|
|
40
|
+
"tags": ["AI", "教育", "就业"],
|
|
41
|
+
"source_video_id": "7582142740935970054",
|
|
42
|
+
"author": "一鸣财经",
|
|
43
|
+
"created_at": "2026-04-03"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
| 字段 | 说明 |
|
|
49
|
+
|------|------|
|
|
50
|
+
| id | 递增编号 bm001, bm002... |
|
|
51
|
+
| topic | 所属主题目录名 |
|
|
52
|
+
| title | 素材标题 |
|
|
53
|
+
| type | transcription(转写) / analysis(拆解) / collection(合集) |
|
|
54
|
+
| file | 相对路径 |
|
|
55
|
+
| tags | 关键词标签,用于检索匹配 |
|
|
56
|
+
| source_video_id | 来源视频 ID(可选) |
|
|
57
|
+
| author | 原作者(可选) |
|
|
58
|
+
| created_at | 入库日期 |
|
|
59
|
+
|
|
60
|
+
## AI 检索规则
|
|
61
|
+
|
|
62
|
+
1. 做选题时,先读 `index.json` 看有没有相关素材
|
|
63
|
+
2. 按 tags 或 topic 匹配,不要全量扫描目录
|
|
64
|
+
3. 只读匹配到的具体文件,不读整个目录
|
|
65
|
+
|
|
23
66
|
## 和 claims 的关系
|
|
24
67
|
|
|
25
|
-
`claims/`
|
|
68
|
+
- `claims/` 定义你的核心主张
|
|
69
|
+
- `benchmarks/` 存对标账号的表达方式
|
|
70
|
+
- AI 对比两者,找到差异化的内容角度
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
### cases.jsonl(每行一条 JSON)
|
|
50
50
|
|
|
51
51
|
```json
|
|
52
|
-
{"id":"c001","claim_id":"cl001","angle_id":null,"type":"
|
|
52
|
+
{"id":"c001","claim_id":"cl001","angle_id":null,"type":"phenomenon","title":"标题","summary":"摘要","source":"来源","source_ip":"博主名","tags":["标签1","标签2"],"direction":"positive","date":"2026-03-28","reuse_count":0}
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
| 字段 | 类型 | 必填 | 说明 |
|
|
@@ -57,12 +57,15 @@
|
|
|
57
57
|
| id | string | 是 | 格式 c{NNN} |
|
|
58
58
|
| claim_id | string | 是 | 关联的主张 ID |
|
|
59
59
|
| angle_id | string\|null | 否 | 关联角度 ID,初期可为 null |
|
|
60
|
-
| type | string | 是 | event / opinion / story |
|
|
60
|
+
| type | string | 是 | event(热点事件) / phenomenon(社会现象) / history(历史事件) / business(商业案例) / opinion(观点金句) / story(个人故事) |
|
|
61
61
|
| title | string | 是 | 标题 |
|
|
62
62
|
| summary | string | 是 | 摘要 |
|
|
63
63
|
| source | string | 否 | 来源(平台@账号) |
|
|
64
|
+
| source_ip | string | 否 | 来源 IP 名称(如"栋哥"、"曲曲大女人"),用于按对标 IP 检索 |
|
|
65
|
+
| tags | string[] | 是 | 关键词标签(行业+情绪+场景),用于检索匹配 |
|
|
64
66
|
| direction | string | 是 | positive(证实)/ negative(证伪) |
|
|
65
67
|
| date | string | 否 | 日期 |
|
|
68
|
+
| reuse_count | int | 是 | 被引用次数,初始 0,每次成文引用 +1,避免过度复用 |
|
|
66
69
|
|
|
67
70
|
### outputs.jsonl(每行一条 JSON)
|
|
68
71
|
|
|
@@ -6,10 +6,15 @@
|
|
|
6
6
|
./
|
|
7
7
|
├── agents/content-agent.md # AI 助手的角色定义
|
|
8
8
|
├── profile/ # 你的画像(身份、风格、领域、产品)
|
|
9
|
+
├── claims/ # 主张库(主张定义、角度、产出记录)
|
|
10
|
+
├── assets/ # 内容弹药库(所有素材统一存放)
|
|
11
|
+
│ ├── catalog.json 仓库总览
|
|
12
|
+
│ ├── _index/ 每个主题的素材索引
|
|
13
|
+
│ ├── _自己的/ 你自己的好内容
|
|
14
|
+
│ └── _待分类/ 还没归类的素材
|
|
15
|
+
├── workflows/ # 工作流(会在使用中不断进化)
|
|
9
16
|
├── inbox/ # 素材投喂入口
|
|
10
|
-
├── claims/ # 主张库(你的核心资产)
|
|
11
17
|
├── projects/ # 选题项目
|
|
12
|
-
├── CLAUDE.md # Claude Code 自动载入文件
|
|
13
18
|
└── guide.md # 就是这份指南
|
|
14
19
|
```
|
|
15
20
|
|
|
@@ -18,17 +23,17 @@
|
|
|
18
23
|
## 全流程概览
|
|
19
24
|
|
|
20
25
|
```
|
|
21
|
-
发现热点 → 匹配主张 → 找角度 →
|
|
22
|
-
↑ ↑ ↑
|
|
23
|
-
热榜/搜索 claims.json angles
|
|
26
|
+
发现热点 → 匹配主张 → 找角度 → 从弹药库找素材 → 不够就搜+转写+入库 → 产出内容
|
|
27
|
+
↑ ↑ ↑ ↑ ↑ ↑
|
|
28
|
+
热榜/搜索 claims.json angles assets/ 自动补充 outputs
|
|
24
29
|
```
|
|
25
30
|
|
|
26
31
|
1. **发现**:用热榜或搜索找到值得追的热点
|
|
27
32
|
2. **匹配**:看这个热点能挂到你的哪个主张上
|
|
28
33
|
3. **切角度**:从角度库找已有角度,或基于主张推新角度
|
|
29
|
-
4.
|
|
30
|
-
5.
|
|
31
|
-
6.
|
|
34
|
+
4. **找素材**:AI 从弹药库按标签检索相关案例和对标文案
|
|
35
|
+
5. **补素材**:弹药库里不够就自动搜索、转写、拆解、入库
|
|
36
|
+
6. **产出**:组合成文,记录到 outputs.jsonl
|
|
32
37
|
|
|
33
38
|
---
|
|
34
39
|
|
|
@@ -75,6 +80,21 @@
|
|
|
75
80
|
|
|
76
81
|
---
|
|
77
82
|
|
|
83
|
+
## 第三步:积累内容弹药
|
|
84
|
+
|
|
85
|
+
`assets/` 是你的内容弹药库。所有素材——对标博主的文案、你自己的金句、搜索到的案例——全部存在这里。
|
|
86
|
+
|
|
87
|
+
AI 通过三层检索找素材:
|
|
88
|
+
1. 先看 `catalog.json`(仓库总览)判断翻哪个主题
|
|
89
|
+
2. 再看 `_index/{主题}.jsonl` 按标签筛出相关条目
|
|
90
|
+
3. 只读命中的具体文件
|
|
91
|
+
|
|
92
|
+
你自己的好内容存在 `assets/_自己的/`,AI 取用时会优先用你验证过的素材。
|
|
93
|
+
|
|
94
|
+
详见 `assets/README.md`。
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
78
98
|
## 各能力快速入门
|
|
79
99
|
|
|
80
100
|
### 热榜 — 看当前什么话题热
|
|
@@ -93,29 +113,24 @@
|
|
|
93
113
|
9000ai search keyword "知识付费" --sort 0 --time 7
|
|
94
114
|
```
|
|
95
115
|
|
|
96
|
-
结果自动存到 `output/` 目录
|
|
97
|
-
|
|
98
116
|
### 对标监控 — 盯住你的对标账号
|
|
99
117
|
|
|
100
118
|
```bash
|
|
101
119
|
# 查看已有监控目标
|
|
102
120
|
9000ai monitor list-creators
|
|
103
121
|
|
|
122
|
+
# 直接看某人主页视频
|
|
123
|
+
9000ai monitor fetch --sec-user <sec_user_id> --fields desc,likes,shares,create_time
|
|
124
|
+
|
|
104
125
|
# 提交监控任务
|
|
105
126
|
9000ai monitor submit --json-file <配置文件>
|
|
106
|
-
|
|
107
|
-
# 查看执行历史
|
|
108
|
-
9000ai monitor list-runs
|
|
109
127
|
```
|
|
110
128
|
|
|
111
129
|
### 视频转文字
|
|
112
130
|
|
|
113
131
|
```bash
|
|
114
|
-
#
|
|
115
|
-
9000ai transcribe submit --
|
|
116
|
-
|
|
117
|
-
# 查看任务状态
|
|
118
|
-
9000ai task status --task-id <id>
|
|
132
|
+
# 按 video_id 转写(推荐)
|
|
133
|
+
9000ai transcribe submit --video-ids <id1,id2,...>
|
|
119
134
|
|
|
120
135
|
# 获取转写结果
|
|
121
136
|
9000ai transcribe text --task-id <id>
|
|
@@ -136,35 +151,45 @@
|
|
|
136
151
|
|
|
137
152
|
1. `9000ai search hot` 拉热榜
|
|
138
153
|
2. 看到热点,问 agent:「这个热点能挂到我的哪个主张上?」
|
|
139
|
-
3. Agent
|
|
140
|
-
4.
|
|
141
|
-
5.
|
|
154
|
+
3. Agent 匹配主张 → 从弹药库检索相关素材 → 推荐角度
|
|
155
|
+
4. 素材不够 → 自动搜索补充 → 转写 → 入库
|
|
156
|
+
5. 组合成文
|
|
142
157
|
6. 录制完成 → 记录到 outputs.jsonl
|
|
143
158
|
|
|
144
159
|
### 场景 B:投喂素材,积累弹药
|
|
145
160
|
|
|
146
161
|
1. 把会议记录、文章、视频链接丢进 `inbox/`
|
|
147
162
|
2. 告诉 agent:「处理 inbox」
|
|
148
|
-
3. Agent
|
|
163
|
+
3. Agent 自动分类 → 素材存入 assets/ 对应主题 → 更新索引
|
|
149
164
|
4. 原始文件归档到 `inbox/processed/`
|
|
150
165
|
|
|
151
166
|
### 场景 C:围绕主题做批量选题调研
|
|
152
167
|
|
|
153
168
|
1. `9000ai search keyword "关键词"` 搜索目标内容
|
|
154
|
-
2.
|
|
155
|
-
3.
|
|
156
|
-
4.
|
|
157
|
-
5.
|
|
169
|
+
2. 挑出值得学的视频 → `9000ai transcribe submit` 转文字稿
|
|
170
|
+
3. 转写结果存到 `assets/{主题}/`,拆解报告存旁边
|
|
171
|
+
4. AI 自动更新索引,素材进入弹药库
|
|
172
|
+
5. 基于积累的弹药 → 规划一周选题
|
|
158
173
|
|
|
159
174
|
### 场景 D:对标监控 + 持续素材积累
|
|
160
175
|
|
|
161
176
|
1. `9000ai monitor create-creator` 添加对标账号
|
|
162
177
|
2. 定期监控,获取最新内容
|
|
163
|
-
3. 值得学的视频 → 转写 →
|
|
178
|
+
3. 值得学的视频 → 转写 → 拆解 → 存到 `assets/` → 案例入库
|
|
164
179
|
4. 找对标做了但你没做的角度 → 新选题
|
|
165
180
|
|
|
166
181
|
---
|
|
167
182
|
|
|
183
|
+
## 工作流进化
|
|
184
|
+
|
|
185
|
+
`workflows/` 目录下的工作流文件会在使用中不断进化。你每次纠正 AI 的判断,AI 会把验证过的标准追加进去。
|
|
186
|
+
|
|
187
|
+
比如你说"点赞低于500的案例不要",AI 就把这条规则追加到对应工作流里。下次自动按这个标准筛,不再问你。
|
|
188
|
+
|
|
189
|
+
用得越多,规则越多,AI 越来越不需要问你。
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
168
193
|
## 常见问题
|
|
169
194
|
|
|
170
195
|
**怎么重新初始化?**
|
|
@@ -183,3 +208,6 @@
|
|
|
183
208
|
|
|
184
209
|
**inbox 里的文件处理完去哪了?**
|
|
185
210
|
归档到 `inbox/processed/`,不会被删除。
|
|
211
|
+
|
|
212
|
+
**弹药库素材怎么找?**
|
|
213
|
+
不需要手动找。告诉 AI 你要做什么,AI 会自动从 assets/ 检索。你也可以按主题文件夹自己翻。
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 工作流
|
|
2
|
+
|
|
3
|
+
这里存放内容生产的工作流定义。
|
|
4
|
+
|
|
5
|
+
## 核心特性
|
|
6
|
+
|
|
7
|
+
工作流不是写死的。你和 AI 一起用的过程中,AI 会把验证过的标准追加到对应工作流文件里。用得越多,AI 自主空间越大,需要问你的越少。
|
|
8
|
+
|
|
9
|
+
## 每个工作流文件的结构
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
# 工作流名称
|
|
13
|
+
|
|
14
|
+
## 步骤
|
|
15
|
+
(具体步骤)
|
|
16
|
+
|
|
17
|
+
## 已验证规则
|
|
18
|
+
(在使用中逐步积累,AI 追加,用户确认)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 规则追加原则
|
|
22
|
+
|
|
23
|
+
- 只记真正的规律,单次偶发纠正不写入
|
|
24
|
+
- 记标准不记操作
|
|
25
|
+
- 记原因,方便判断边界情况
|
|
26
|
+
- 用户确认后才追加
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: content-processing
|
|
3
|
+
description: 当用户要批量拆解文案、改写文案、提取摘要、或用自定义 prompt 批量处理文本时使用。后台异步执行,提交后通过 task status 回查结果。
|
|
4
|
+
triggers:
|
|
5
|
+
- 文案拆解
|
|
6
|
+
- 文案改写
|
|
7
|
+
- 文案分析
|
|
8
|
+
- 批量拆解
|
|
9
|
+
- 批量改写
|
|
10
|
+
- 内容摘要
|
|
11
|
+
- 批量处理文案
|
|
12
|
+
role: operator
|
|
13
|
+
scope: execution
|
|
14
|
+
output-format: task-oriented
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# 内容处理 Skill
|
|
18
|
+
|
|
19
|
+
批量 LLM 文案处理:拆解、改写、摘要,或自定义 prompt。
|
|
20
|
+
|
|
21
|
+
## 适用范围
|
|
22
|
+
|
|
23
|
+
- 批量文案拆解(提取 hook、论点、金句、节奏等)
|
|
24
|
+
- 批量文案改写
|
|
25
|
+
- 批量提取摘要
|
|
26
|
+
- 自定义 prompt 批量处理任意文本
|
|
27
|
+
|
|
28
|
+
## 内置 Preset
|
|
29
|
+
|
|
30
|
+
| Preset | 说明 |
|
|
31
|
+
|--------|------|
|
|
32
|
+
| `analyze` | 结构化拆解:hook/主题/论点/金句/CTA/节奏 |
|
|
33
|
+
| `summarize` | 100 字以内核心摘要 |
|
|
34
|
+
| `rewrite` | 保留观点换表达 |
|
|
35
|
+
|
|
36
|
+
查看可用 preset:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
9000ai content presets
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 工作方式
|
|
43
|
+
|
|
44
|
+
内容处理是异步任务:
|
|
45
|
+
1. 准备文本文件(JSON 格式)
|
|
46
|
+
2. 提交批量任务
|
|
47
|
+
3. 拿到 batch_id
|
|
48
|
+
4. 回查结果
|
|
49
|
+
|
|
50
|
+
## 文本文件格式
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
[
|
|
54
|
+
{"id": "bm001", "text": "文案内容..."},
|
|
55
|
+
{"id": "bm002", "text": "另一段文案..."}
|
|
56
|
+
]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`id` 用于标识每段文案,建议用有意义的名称(如视频 ID、标题缩写等)。
|
|
60
|
+
|
|
61
|
+
## 命令
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# 用内置 preset 拆解
|
|
65
|
+
9000ai content analyze --preset analyze --texts-file texts.json --group-label "AI就业-拆解"
|
|
66
|
+
|
|
67
|
+
# 用内置 preset 改写
|
|
68
|
+
9000ai content analyze --preset rewrite --texts-file texts.json
|
|
69
|
+
|
|
70
|
+
# 用自定义 prompt
|
|
71
|
+
9000ai content analyze --system-prompt "请提取文案中的数据和论据" --texts-file texts.json
|
|
72
|
+
|
|
73
|
+
# 提交并等待结果
|
|
74
|
+
9000ai content analyze --preset analyze --texts-file texts.json --wait
|
|
75
|
+
|
|
76
|
+
# 查询结果
|
|
77
|
+
9000ai task status --batch-id <batch_id>
|
|
78
|
+
9000ai task results --task-id <task_id> --fields output
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 典型串联流程
|
|
82
|
+
|
|
83
|
+
监控 → 转写 → 拆解:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# 1. 转写视频
|
|
87
|
+
9000ai transcribe submit --video-ids <id1>,<id2> --group-label "竞品分析"
|
|
88
|
+
|
|
89
|
+
# 2. 提取文案到本地
|
|
90
|
+
9000ai transcribe text --task-id <task_id1> --dir "竞品分析"
|
|
91
|
+
9000ai transcribe text --task-id <task_id2> --dir "竞品分析"
|
|
92
|
+
|
|
93
|
+
# 3. 准备 texts.json(从转写文案组装)
|
|
94
|
+
# 4. 批量拆解
|
|
95
|
+
9000ai content analyze --preset analyze --texts-file texts.json --group-label "竞品分析-拆解" --wait
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 性能准则(必须遵守)
|
|
99
|
+
|
|
100
|
+
### 数据精简
|
|
101
|
+
|
|
102
|
+
查询结果时用 `--fields` 只取需要的字段。
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# 只取 LLM 输出
|
|
106
|
+
9000ai task results --task-id <id> --fields output
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 并行执行
|
|
110
|
+
|
|
111
|
+
独立操作必须并行,不要串行等待。
|
|
112
|
+
|
|
113
|
+
### 不暴露中间过程
|
|
114
|
+
|
|
115
|
+
拿到结果后直接呈现分析结论,不要展示原始 JSON。
|
|
116
|
+
|
|
117
|
+
## 参考
|
|
118
|
+
|
|
119
|
+
接口细节见 `references/endpoints.md`。
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Content Processing API Endpoints
|
|
2
|
+
|
|
3
|
+
## POST /api/v1/content/batch-analyze
|
|
4
|
+
|
|
5
|
+
批量提交 LLM 处理任务。
|
|
6
|
+
|
|
7
|
+
**Request:**
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"preset": "analyze",
|
|
12
|
+
"texts": [
|
|
13
|
+
{"id": "bm001", "text": "文案内容..."},
|
|
14
|
+
{"id": "bm002", "text": "另一段..."}
|
|
15
|
+
],
|
|
16
|
+
"model": "gemini-2.5-pro",
|
|
17
|
+
"group_label": "AI就业-拆解",
|
|
18
|
+
"webhook": "https://..."
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| 字段 | 必填 | 说明 |
|
|
23
|
+
|------|------|------|
|
|
24
|
+
| preset | 二选一 | 内置模板名:analyze / summarize / rewrite |
|
|
25
|
+
| system_prompt | 二选一 | 自定义 system prompt |
|
|
26
|
+
| texts | 是 | 文本列表,每项含 id 和 text |
|
|
27
|
+
| model | 否 | 覆盖默认模型 |
|
|
28
|
+
| group_label | 否 | 分组标签 |
|
|
29
|
+
| webhook | 否 | 回调地址 |
|
|
30
|
+
|
|
31
|
+
**Response:**
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"code": 0,
|
|
36
|
+
"data": {
|
|
37
|
+
"batch_id": "uuid",
|
|
38
|
+
"total_tasks": 2,
|
|
39
|
+
"tasks": [
|
|
40
|
+
{"task_id": "uuid", "third_party_task_id": "bm001", "status": "pending"},
|
|
41
|
+
{"task_id": "uuid", "third_party_task_id": "bm002", "status": "pending"}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"message": "已提交 2 个 LLM 任务"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## GET /api/v1/content/presets
|
|
49
|
+
|
|
50
|
+
列出可用的内置 preset。
|
|
51
|
+
|
|
52
|
+
**Response:**
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"code": 0,
|
|
57
|
+
"data": {
|
|
58
|
+
"presets": ["analyze", "rewrite", "summarize"]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 结果查询
|
|
64
|
+
|
|
65
|
+
使用通用任务接口:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
GET /api/v1/tasks/{task_id}
|
|
69
|
+
GET /api/v1/tasks/batch/{batch_id}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
每个 task 的 `output` 字段包含 LLM 返回的处理结果。
|
|
@@ -19,39 +19,33 @@ output-format: file-oriented
|
|
|
19
19
|
|
|
20
20
|
# 抖音选题发现 Skill
|
|
21
21
|
|
|
22
|
-
这个 skill 对应一个能力:`douyin_topic_discovery
|
|
22
|
+
这个 skill 对应一个能力:`douyin_topic_discovery`。用于拉取抖音热点榜和按关键词搜索视频。
|
|
23
23
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
不要去别的文档里猜变量名。这个 skill 固定只认中台统一变量:
|
|
24
|
+
## 命令
|
|
27
25
|
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
```bash
|
|
27
|
+
# 热榜
|
|
28
|
+
9000ai search hot --type society --count 20
|
|
29
|
+
9000ai search hot --type all --count 20
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
# 关键词搜索(异步,返回 batch_id)
|
|
32
|
+
9000ai search keyword “AI创业” “副业” --sort 0 --time 7 --min-likes 200
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```
|
|
34
|
+
# 搜索并等待结果
|
|
35
|
+
9000ai search keyword “知识付费” --wait --fields desc,author_name,likes
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
# 查询批次结果
|
|
38
|
+
9000ai search batch-result --batch-id <batch_id> --fields desc,author_name,likes
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
# 查看结果文件
|
|
41
|
+
9000ai search list-output
|
|
42
|
+
9000ai search show-result --input latest_search --row 3
|
|
43
|
+
9000ai search export-media --input latest_search --row 3
|
|
45
44
|
```
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
搜索结果数量:每个关键词默认 30 条,后端自动翻页聚合。
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
"base_url": "http://127.0.0.1:8025",
|
|
52
|
-
"api_key": "sk-xxx"
|
|
53
|
-
}
|
|
54
|
-
```
|
|
48
|
+
常用榜单类型:`hot`(综合)、`society`(社会)、`entertainment`(娱乐)、`seeding`(种草)、`city`(城市)、`challenge`(挑战)
|
|
55
49
|
|
|
56
50
|
## 批量选题调研
|
|
57
51
|
|
|
@@ -61,104 +55,24 @@ X-API-Key
|
|
|
61
55
|
|
|
62
56
|
按该文档的阶段逐步执行,不要跳步。
|
|
63
57
|
|
|
64
|
-
## 当前范围
|
|
65
|
-
|
|
66
|
-
用于:
|
|
67
|
-
- 获取抖音热点榜
|
|
68
|
-
- 按关键词搜索抖音搜索流
|
|
69
|
-
- 把结果落到 `output/` 目录
|
|
70
|
-
- 让后续脚本按文件继续消费
|
|
71
|
-
- 批量选题调研(按工作流文档执行)
|
|
72
|
-
|
|
73
|
-
不负责:
|
|
74
|
-
- 自动生成推荐结论
|
|
75
|
-
|
|
76
|
-
## 工作方式
|
|
77
|
-
|
|
78
|
-
标准动作是:
|
|
79
|
-
1. 调热榜或搜索流 API
|
|
80
|
-
2. 把结果写到 `douyin-topic-discovery-9000AI/output/`
|
|
81
|
-
3. 对话里只展示摘要和少量关键字段
|
|
82
|
-
|
|
83
|
-
`search` 现在是真异步:
|
|
84
|
-
1. 先提交 `batch`
|
|
85
|
-
2. 立即返回 `batch_id`
|
|
86
|
-
3. 需要结果时,再用 `batch-result` 查询
|
|
87
|
-
4. 查询到结果后,再落 `latest_search.json/tsv`
|
|
88
|
-
|
|
89
|
-
## 配置
|
|
90
|
-
|
|
91
|
-
优先推荐直接配中台统一环境变量:
|
|
92
|
-
|
|
93
|
-
```powershell
|
|
94
|
-
$env:9000AI_BASE_URL = "http://127.0.0.1:8025"
|
|
95
|
-
$env:9000AI_API_KEY = "sk-xxx"
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
或者通过 CLI 写入配置:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
9000ai config set --base-url http://127.0.0.1:8025 --api-key <key>
|
|
102
|
-
```
|
|
103
|
-
|
|
104
58
|
## 输出目录
|
|
105
59
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
output/
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
常用文件:
|
|
113
|
-
- `latest_hot.json`
|
|
114
|
-
- `latest_hot.tsv`
|
|
115
|
-
- `latest_search.json`
|
|
116
|
-
- `latest_search.tsv`
|
|
117
|
-
|
|
118
|
-
## 命令
|
|
119
|
-
|
|
120
|
-
查看帮助:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
9000ai search --help
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
常用命令:
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
9000ai config set --base-url http://127.0.0.1:8025 --api-key <key>
|
|
130
|
-
9000ai auth whoami
|
|
131
|
-
9000ai auth capabilities
|
|
132
|
-
9000ai search hot --type society --count 20
|
|
133
|
-
9000ai search keyword "AI创业" "副业" --sort 0 --time 7 --content-type 1 --filter-duration 0 --min-likes 200 --min-comments 20
|
|
134
|
-
9000ai search batch-result --batch-id <batch_id>
|
|
135
|
-
9000ai search list-output
|
|
136
|
-
9000ai search show-result --input latest_search --row 3
|
|
137
|
-
9000ai search export-media --input latest_search --row 3
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
搜索结果数量规则:
|
|
141
|
-
- `search` 每个关键词默认抓取 `30` 条
|
|
142
|
-
- 后端会基于 `search_general_v3` 自动翻页聚合,不需要额外传分页参数
|
|
60
|
+
结果自动落盘到 `output/`:
|
|
61
|
+
- `latest_hot.json` / `latest_hot.tsv`
|
|
62
|
+
- `latest_search.json` / `latest_search.tsv`
|
|
143
63
|
|
|
144
64
|
## 性能准则(必须遵守)
|
|
145
65
|
|
|
146
66
|
### 数据精简
|
|
147
67
|
|
|
148
|
-
|
|
68
|
+
**默认必须用 `--fields` 只取需要的字段,禁止全量读取。**
|
|
149
69
|
|
|
150
70
|
```bash
|
|
151
|
-
# 错误 —
|
|
71
|
+
# 错误 — 全量返回
|
|
152
72
|
9000ai search batch-result --batch-id <id>
|
|
153
73
|
|
|
154
|
-
# 正确 —
|
|
74
|
+
# 正确 — 只取需要的字段
|
|
155
75
|
9000ai search batch-result --batch-id <id> --fields desc,author_name,likes,duration
|
|
156
|
-
|
|
157
|
-
# CSV 格式 — 省 token,适合列表数据
|
|
158
|
-
9000ai search keyword "美食探店" --wait --format csv --fields desc,author_name,author_sec_uid,likes
|
|
159
|
-
|
|
160
|
-
# 更紧凑 — 每条一行 JSON
|
|
161
|
-
9000ai search batch-result --batch-id <id> --fields desc,author_name,likes --compact
|
|
162
76
|
```
|
|
163
77
|
|
|
164
78
|
常用字段组合:
|
|
@@ -168,24 +82,14 @@ output/
|
|
|
168
82
|
|
|
169
83
|
### 并行执行
|
|
170
84
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
可以并行:
|
|
174
|
-
- 多个 `batch-result` 查询(不同 batch_id)
|
|
175
|
-
- 写输出文件 + 查询下一批结果
|
|
176
|
-
- 多关键词搜索提交后,同时查询各自的 batch_id
|
|
177
|
-
|
|
178
|
-
不能并行:
|
|
179
|
-
- 提交搜索 → 等 batch_id 返回 → 查询结果(有依赖)
|
|
180
|
-
|
|
181
|
-
### 减少中间文件
|
|
85
|
+
独立操作必须并行。多个 batch_id 的结果查询、多关键词搜索提交后同时查询。
|
|
182
86
|
|
|
183
|
-
|
|
87
|
+
不能并行:提交搜索 → 等 batch_id → 查结果(有依赖)。
|
|
184
88
|
|
|
185
89
|
### 不暴露中间过程
|
|
186
90
|
|
|
187
|
-
|
|
91
|
+
拿到结果后直接输出摘要或执行下一步,不要把原始 JSON 全量展示给用户。
|
|
188
92
|
|
|
189
|
-
##
|
|
93
|
+
## 参考
|
|
190
94
|
|
|
191
|
-
|
|
95
|
+
接口细节和字段说明见 `references/endpoints.md`。
|