diff --git a/docs/src/content/docs/reference/cli/commands.md b/docs/src/content/docs/reference/cli/commands.md index 9b0e0aa98a..9e44a60790 100644 --- a/docs/src/content/docs/reference/cli/commands.md +++ b/docs/src/content/docs/reference/cli/commands.md @@ -42,6 +42,7 @@ Options: -t, --temperature temperature for the run -tp, --top-p top-p for the run -m, --model model for the run + -mt, --max-tokens maximum tokens for the run -se, --seed seed for the run --no-cache disable LLM result cache --cs, --csv-separator csv separator (default: "\t") @@ -73,6 +74,7 @@ Options: -t, --temperature temperature for the run -tp, --top-p top-p for the run -m, --model model for the run + -mt, --max-tokens maximum tokens for the run -se, --seed seed for the run --no-cache disable LLM result cache -ae, --apply-edits apply file edits diff --git a/packages/cli/src/main.ts b/packages/cli/src/main.ts index a7918fd136..c79c2b3ce3 100644 --- a/packages/cli/src/main.ts +++ b/packages/cli/src/main.ts @@ -153,6 +153,7 @@ async function batch( temperature: string topP: string seed: string + maxTokens: string model: string cache: boolean applyEdits: boolean @@ -185,6 +186,7 @@ async function batch( const temperature = normalizeFloat(options.temperature) const topP = normalizeFloat(options.topP) const seed = normalizeFloat(options.seed) + const maxTokens = normalizeInt(options.maxTokens) const toolFiles: string[] = [] if (scriptRx.test(tool)) toolFiles.push(tool) @@ -264,6 +266,7 @@ async function batch( temperature, topP, seed, + maxTokens, model, retry, retryDelay, @@ -394,6 +397,7 @@ async function run( temperature: string topP: string seed: string + maxTokens: string model: string csvSeparator: string cache: boolean @@ -419,6 +423,7 @@ async function run( const temperature = normalizeFloat(options.temperature) const topP = normalizeFloat(options.topP) const seed = normalizeFloat(options.seed) + const maxTokens = normalizeInt(options.maxTokens) const cache = !!options.cache const applyEdits = !!options.applyEdits const model = options.model @@ -522,6 +527,7 @@ ${Array.from(files) temperature, topP, seed, + maxTokens, model, retry, retryDelay, @@ -895,6 +901,7 @@ async function main() { .option("-t, --temperature ", "temperature for the run") .option("-tp, --top-p ", "top-p for the run") .option("-m, --model ", "model for the run") + .option("-mt, --max-tokens ", "maximum tokens for the run") .option("-se, --seed ", "seed for the run") .option("--no-cache", "disable LLM result cache") .option("--cs, --csv-separator ", "csv separator", "\t") @@ -931,6 +938,7 @@ async function main() { .option("-t, --temperature ", "temperature for the run") .option("-tp, --top-p ", "top-p for the run") .option("-m, --model ", "model for the run") + .option("-mt, --max-tokens ", "maximum tokens for the run") .option("-se, --seed ", "seed for the run") .option("--no-cache", "disable LLM result cache") .option("-ae, --apply-edits", "apply file edits")