Skip to content

Commit 2230a4c

Browse files
committed
docs: add API Key privacy notice and model indicator in analysis output
1 parent b85dc71 commit 2230a4c

4 files changed

Lines changed: 43 additions & 4 deletions

File tree

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A powerful Chrome extension to scrape comment data from Xiaohongshu (小红书),
2222
-**CSV Export** - One-click export to CSV format that Excel can open directly
2323
-**Visual Interface** - Floating toolbar on page + extension popup dual interface
2424
-**Real-time Statistics** - Real-time display of scraping progress and comment count
25-
-**GPT Analysis** - AI-powered comment analysis using OpenAI API
25+
-**GPT Analysis** - AI-powered comment analysis using OpenAI API (requires your own API key, not stored on server, defaults to GPT-5-nano model)
2626

2727
### 🎨 UI Design
2828

@@ -149,6 +149,20 @@ A powerful Chrome extension to scrape comment data from Xiaohongshu (小红书),
149149

150150
## ⚙️ Advanced Features
151151

152+
### GPT Analysis
153+
154+
The extension includes AI-powered comment analysis using OpenAI's API. To use this feature:
155+
156+
- **API Key Required**: You need to provide your own OpenAI API key. The key is stored locally in your browser and **never sent to any server** except OpenAI's API.
157+
- **Default Model**: Uses `gpt-5-nano-2025-08-07` model by default (cost-effective option).
158+
- **Model Indicator**: Each analysis output will display the model name in the first line.
159+
- **How to Use**:
160+
1. Open the floating panel on a supported site
161+
2. Enter your OpenAI API key in the "GPT API Key" field
162+
3. Click "Save" to store it locally
163+
4. Click "✨ GPT智能分析" to start analysis
164+
5. View formatted analysis results in the analysis panel
165+
152166
### Console Debugging
153167

154168
Type the following commands in browser console to view data:
@@ -322,7 +336,7 @@ If this project helps you, please give it a Star ⭐️
322336
-**CSV导出** - 一键导出为Excel可直接打开的CSV格式
323337
-**可视化界面** - 页面悬浮工具栏 + 插件弹窗双界面
324338
-**实时统计** - 实时显示抓取进度和评论数量
325-
-**GPT智能分析** - 使用 OpenAI API 进行 AI 评论分析
339+
-**GPT智能分析** - 使用 OpenAI API 进行 AI 评论分析(需输入自己的 API Key,服务器不会保存,默认使用 GPT-5-nano 模型)
326340

327341
### 🎨 界面设计
328342

@@ -449,6 +463,20 @@ If this project helps you, please give it a Star ⭐️
449463

450464
## ⚙️ 高级功能
451465

466+
### GPT 智能分析
467+
468+
插件包含基于 OpenAI API 的 AI 评论分析功能。使用方法:
469+
470+
- **需要 API Key**:需要提供你自己的 OpenAI API Key。密钥仅保存在本地浏览器中,**不会上传到任何服务器**(仅发送给 OpenAI API)。
471+
- **默认模型**:默认使用 `gpt-5-nano-2025-08-07` 模型(经济实惠的选择)。
472+
- **模型标识**:每次分析输出的第一行会显示使用的模型名称。
473+
- **使用步骤**
474+
1. 在支持站点打开悬浮面板
475+
2. 在"GPT API Key"输入框中输入你的 OpenAI API Key
476+
3. 点击"保存"按钮,密钥将保存在本地
477+
4. 点击"✨ GPT智能分析"按钮开始分析
478+
5. 在分析面板查看格式化后的分析结果
479+
452480
### 控制台调试
453481

454482
在浏览器控制台输入以下命令查看数据:

content/content.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,13 @@
357357
margin-bottom: 8px;
358358
}
359359

360+
.scraper-api-hint {
361+
font-size: 11px;
362+
color: #86868b;
363+
margin-top: 6px;
364+
line-height: 1.4;
365+
}
366+
360367
.scraper-ai-row {
361368
display: flex;
362369
gap: 8px;

content/content.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,6 +1684,7 @@
16841684
<button class="scraper-button scraper-button-secondary scraper-button-small" id="scraper-save-key">保存</button>
16851685
<button class="scraper-button scraper-button-secondary scraper-button-small" id="scraper-clear-key">清除</button>
16861686
</div>
1687+
<div class="scraper-api-hint">API Key 仅保存在本地,不会上传到服务器。默认使用 gpt-5-nano-2025-08-07 模型。</div>
16871688
</div>
16881689
<div class="scraper-card scraper-ai-actions-card">
16891690
<div class="scraper-ai-actions">
@@ -2813,7 +2814,10 @@
28132814
this.uiController.setAiProgress(60, true);
28142815
const result = await this.requestOpenAI(key, prompt);
28152816
this.uiController.setAiProgress(100, true);
2816-
this.uiController.setAiOutput(result);
2817+
// 在分析结果第一行添加模型标识
2818+
const modelName = 'gpt-5-nano-2025-08-07';
2819+
const resultWithModel = `[模型: ${modelName}]\n\n${result}`;
2820+
this.uiController.setAiOutput(resultWithModel);
28172821
this.uiController.updateStatus('分析完成', '#34C759');
28182822
} catch (err) {
28192823
this.uiController.setAiOutput(`分析失败: ${err.message || err}`);

popup/popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<input type="password" class="setting-input" id="apiKeyInput" placeholder="输入 OpenAI API Key">
3636
<button class="setting-btn-small" id="saveApiKeyBtn">保存</button>
3737
</div>
38-
<div class="setting-hint">用于 GPT 智能分析功能</div>
38+
<div class="setting-hint">用于 GPT 智能分析功能,API Key 仅保存在本地浏览器,不会上传到服务器。默认使用 gpt-5-nano-2025-08-07 模型。</div>
3939
</div>
4040
<div class="setting-item">
4141
<label class="setting-label">自动滚动速度</label>

0 commit comments

Comments
 (0)