From ea4b5a4dfee7bad69b56bc2d48751becb00daa7b Mon Sep 17 00:00:00 2001 From: xiaowei Date: Thu, 20 Aug 2026 00:10:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(distill):=20max=5Ftokens=20600=E2=86=92800?= =?UTF-8?q?=20=E2=80=94=20Agnes=E6=8E=A8=E7=90=86=E6=A8=A1=E5=9E=8BJSON?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit engine.go: max_tokens 600→800 consolidate.go: max_tokens 300→800 根因: Agnes 2.0-flash是推理模型,max_tokens=600里大量是推理token, 正文只剩~300→JSON截断→parse error→蒸馏退化。 800确保推理+正文都够用。 --- go/internal/distill/consolidate.go | 2 +- go/internal/distill/engine.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/internal/distill/consolidate.go b/go/internal/distill/consolidate.go index d9f9288..d4f9ce7 100644 --- a/go/internal/distill/consolidate.go +++ b/go/internal/distill/consolidate.go @@ -184,7 +184,7 @@ func (e *Engine) ConsolidateMemory(target MemoryCandidate, candidates []MemoryCa "model": e.LLMModel, "messages": []map[string]string{{"role": "user", "content": prompt}}, "temperature": 0.1, - "max_tokens": 300, + "max_tokens": 800, } jsonBody, err := json.Marshal(body) if err != nil { diff --git a/go/internal/distill/engine.go b/go/internal/distill/engine.go index 0847ef4..f5bab50 100644 --- a/go/internal/distill/engine.go +++ b/go/internal/distill/engine.go @@ -339,7 +339,7 @@ func (e *Engine) callLLM5D(content string) (LLMResponse, error) { {"role": "user", "content": prompt}, }, "temperature": 0.2, - "max_tokens": 600, + "max_tokens": 800, } jsonBody, err := json.Marshal(body)