This commit is contained in:
2026-08-16 21:35:48 +02:00
parent 106f602232
commit 389608ea56
28 changed files with 2491 additions and 115 deletions
+17 -13
View File
@@ -8,21 +8,25 @@ import (
"strings"
)
// Local / weak-model defaults (8k-class context). See docs/local-llm-tuning.md.
// Local / weak-model defaults. See docs/local-llm-tuning.md.
const (
DefaultStructuredTemp = 0.2
// Reasoning-capable OpenAI-compatible models (e.g. code-fast / Qwen3) spend
// hundredsthousands of tokens in reasoning_content before writing message.content.
// 350 capped mid-thought → empty content → "empty model response".
MaxTokensEnhance = 4096
MaxTokensSEO = 180
MaxTokensCampaign = 650
MaxProductDescRunes = 400
MaxAttrKeys = 10
MaxAttrValueRunes = 60
MaxBrandInjectRunes = 500
MaxCampaignProducts = 8
MaxCampaignNameRunes = 80
// Reasoning-capable OpenAI-compatible models (e.g. OverloadedBot code-fast)
// spend thousands of tokens in reasoning_content before message.content.
// Formula HTML JSON often needs a large completion budget; 4096 hit
// finish_reason=length with empty/truncated content in live enhance.
MaxTokensEnhance = 16384
// MaxTokensEnhanceRetry is the one-shot length-cap bump ceiling used by
// OpenAIClient when finish_reason=length yields empty or unparseable JSON.
MaxTokensEnhanceRetry = 32768
MaxTokensSEO = 180
MaxTokensCampaign = 650
MaxProductDescRunes = 400
MaxAttrKeys = 10
MaxAttrValueRunes = 60
MaxBrandInjectRunes = 500
MaxCampaignProducts = 8
MaxCampaignNameRunes = 80
)
// CompleteOptions tunes a single chat completion for structured tasks.