加一套抓真实请求做预设对比的工具,并把三份预设的机制差异记进 README。
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// 看预设里采样参数字段的类型(有些预设存成字符串,本仓库可能因此丢掉)。
|
||||
import { readFileSync } from "node:fs";
|
||||
const keys = ["temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "openai_max_tokens", "openai_max_context", "seed", "n", "stream_openai"];
|
||||
for (const file of process.argv.slice(2)) {
|
||||
const raw = JSON.parse(readFileSync(file, "utf8"));
|
||||
console.log("=== " + file.split("/").pop());
|
||||
for (const k of keys) {
|
||||
const v = raw[k];
|
||||
console.log(" " + k.padEnd(20) + " " + (v === undefined ? "(缺)" : typeof v + " = " + JSON.stringify(v)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user