mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
chore: Also format scripts and skills.
This commit is contained in:
@@ -13,8 +13,7 @@ type RunResult = {
|
||||
usage?: Usage;
|
||||
};
|
||||
|
||||
const DEFAULT_PROMPT =
|
||||
"Reply with a single word: ok. No punctuation or extra text.";
|
||||
const DEFAULT_PROMPT = "Reply with a single word: ok. No punctuation or extra text.";
|
||||
const DEFAULT_RUNS = 10;
|
||||
|
||||
function parseArg(flag: string): string | undefined {
|
||||
@@ -65,9 +64,7 @@ async function runModel(opts: {
|
||||
);
|
||||
const durationMs = Date.now() - started;
|
||||
results.push({ durationMs, usage: res.usage });
|
||||
console.log(
|
||||
`${opts.label} run ${i + 1}/${opts.runs}: ${durationMs}ms`,
|
||||
);
|
||||
console.log(`${opts.label} run ${i + 1}/${opts.runs}: ${durationMs}ms`);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
@@ -85,10 +82,8 @@ async function main(): Promise<void> {
|
||||
throw new Error("Missing MINIMAX_API_KEY in environment.");
|
||||
}
|
||||
|
||||
const minimaxBaseUrl =
|
||||
process.env.MINIMAX_BASE_URL?.trim() || "https://api.minimax.io/v1";
|
||||
const minimaxModelId =
|
||||
process.env.MINIMAX_MODEL?.trim() || "MiniMax-M2.1";
|
||||
const minimaxBaseUrl = process.env.MINIMAX_BASE_URL?.trim() || "https://api.minimax.io/v1";
|
||||
const minimaxModelId = process.env.MINIMAX_MODEL?.trim() || "MiniMax-M2.1";
|
||||
|
||||
const minimaxModel: Model<"openai-completions"> = {
|
||||
id: minimaxModelId,
|
||||
@@ -135,9 +130,7 @@ async function main(): Promise<void> {
|
||||
console.log("");
|
||||
console.log("Summary (ms):");
|
||||
for (const row of summary) {
|
||||
console.log(
|
||||
`${row.label.padEnd(7)} median=${row.med} min=${row.min} max=${row.max}`,
|
||||
);
|
||||
console.log(`${row.label.padEnd(7)} median=${row.med} min=${row.min} max=${row.max}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user