v2er-insight 1.1.0 → 1.2.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/README.md +10 -2
- package/dist/cli/commands/ai.js +1 -1
- package/dist/cli/commands/config.js +3 -0
- package/dist/config/defaults.d.ts +1 -1
- package/dist/config/defaults.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
V2EX 用户画像深度分析工具。通过自动化抓取数据、统计解析及 AI 语言模型建模,构建多维度的用户行为与心理画像。
|
|
4
4
|
|
|
5
|
+
目前画像结果一般。受限于模型能力、Analyze 结果、提示词,后两个需要更多的迭代。
|
|
6
|
+
|
|
5
7
|
## 核心流程 (Pipe Flow)
|
|
6
8
|
|
|
7
9
|
本项目采用管道化设计,目前通过以下步骤逐步生成深度报告:
|
|
@@ -50,7 +52,7 @@ v2er <username>
|
|
|
50
52
|
| 选项 | 说明 |
|
|
51
53
|
| -------------------------- | ------------------------------------------------------------------ |
|
|
52
54
|
| `--force` | 强制重新抓取(忽略本地缓存) |
|
|
53
|
-
| `--model [name]` | 指定 AI 模型(默认: `gemini-3-pro-preview`)
|
|
55
|
+
| `--model [name]` | 指定 AI 模型(默认: `gemini-3.1-pro-preview`) |
|
|
54
56
|
| `--thinking-level [level]` | 指定思考等级(默认: `high`,可选 `minimal`/`low`/`medium`/`high`) |
|
|
55
57
|
| `-v, --verbose` | 显示调试输出 |
|
|
56
58
|
|
|
@@ -98,7 +100,7 @@ v2er ai <username> [选项]
|
|
|
98
100
|
|
|
99
101
|
| 选项 | 说明 |
|
|
100
102
|
| -------------------------- | ------------------------------------------------------------------ |
|
|
101
|
-
| `--model [name]` | 指定 Gemini 模型(默认: `gemini-3-pro-preview`)
|
|
103
|
+
| `--model [name]` | 指定 Gemini 模型(默认: `gemini-3.1-pro-preview`) |
|
|
102
104
|
| `--thinking-level [level]` | 指定思考等级(默认: `high`,可选 `minimal`/`low`/`medium`/`high`) |
|
|
103
105
|
|
|
104
106
|
### 4. 报告展示 (Show)
|
|
@@ -131,6 +133,12 @@ v2er config set ai.thinkingLevel medium # 设置思考等级
|
|
|
131
133
|
v2er config set log.level debug # 开启调试日志
|
|
132
134
|
v2er config set data.keepRaw true # 保留原始数据
|
|
133
135
|
v2er config set ai.timeout 120000 # AI 请求超时 120s
|
|
136
|
+
v2er config set ai.maxRetries 5 # AI 最大重试次数
|
|
137
|
+
v2er config set ai.baseDelay 2000 # AI 重试基础延迟 2s
|
|
138
|
+
v2er config set ai.maxDelay 20000 # AI 重试最大延迟 20s
|
|
139
|
+
v2er config set fetch.maxRetries 5 # 抓取最大重试次数
|
|
140
|
+
v2er config set fetch.baseDelay 2000 # 抓取重试基础延迟 2s
|
|
141
|
+
v2er config set fetch.maxDelay 30000 # 抓取重试最大延迟 30s
|
|
134
142
|
|
|
135
143
|
# 重置
|
|
136
144
|
v2er config reset # 重置全部为默认值
|
package/dist/cli/commands/ai.js
CHANGED
|
@@ -52,7 +52,7 @@ async function runAi(username, options) {
|
|
|
52
52
|
// 字符串时直接使用,否则回退到配置/默认值(后续支持交互选择时替换此逻辑)
|
|
53
53
|
const model = typeof options.model === 'string'
|
|
54
54
|
? options.model
|
|
55
|
-
: (config.ai?.model ??
|
|
55
|
+
: (config.ai?.model ?? config_1.DEFAULT_CONFIG.ai.model);
|
|
56
56
|
// 同上:--thinking-level [level] 无值时为 true,字符串时直接使用
|
|
57
57
|
const rawThinkingLevel = typeof options.thinkingLevel === 'string' ? options.thinkingLevel : config.ai?.thinkingLevel;
|
|
58
58
|
// 校验 thinkingLevel 合法性
|
|
@@ -36,6 +36,9 @@ const CONFIG_PATHS = {
|
|
|
36
36
|
'ai.maxDelay': { type: 'number' },
|
|
37
37
|
// Fetch
|
|
38
38
|
'fetch.timeout': { type: 'number' },
|
|
39
|
+
'fetch.maxRetries': { type: 'number' },
|
|
40
|
+
'fetch.baseDelay': { type: 'number' },
|
|
41
|
+
'fetch.maxDelay': { type: 'number' },
|
|
39
42
|
// Analyzer
|
|
40
43
|
'analyzer.inactivityThreshold': { type: 'number' },
|
|
41
44
|
'analyzer.chunkMaxTopics': { type: 'number' },
|
|
@@ -21,7 +21,7 @@ export type ResolvedConfig = Required<{
|
|
|
21
21
|
export declare const DEFAULT_CONFIG: {
|
|
22
22
|
readonly ai: {
|
|
23
23
|
readonly provider: "gemini";
|
|
24
|
-
readonly model: "gemini-3-pro-preview";
|
|
24
|
+
readonly model: "gemini-3.1-pro-preview";
|
|
25
25
|
readonly thinkingLevel: "high";
|
|
26
26
|
readonly timeout: 60000;
|
|
27
27
|
readonly maxRetries: 3;
|
package/dist/config/defaults.js
CHANGED