抓包对比工具补一批一次性脚本:拆预设、对请求、跑 A/B 与拒答抽样。

这些脚本都是我对着酒馆真实请求手工核对用的,留在仓库里方便下次重跑;跑出来的本地数据目录含接口 key,已经写进忽略规则。
This commit is contained in:
2026-10-26 01:09:56 +08:00
parent e2413b0677
commit 1a5ef3b2bc
24 changed files with 1568 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
// 临时查看工具:node peek-body.mjs <capture.json> <msgIndex> [chars]
import { readFileSync } from "node:fs";
const body = JSON.parse(JSON.parse(readFileSync(process.argv[2], "utf8")).body);
const idx = Number(process.argv[3] ?? 0);
const n = Number(process.argv[4] ?? 600);
const m = body.messages[idx];
if (!m) { console.log("没有第 " + idx + " 条"); process.exit(0); }
const t = String(m.content ?? "");
console.log("role=" + m.role + " len=" + t.length + " keys=" + JSON.stringify(Object.keys(m)));
console.log(t.slice(0, n));