From f8e6d27342bc55788d3e3b64c18d159b862f998c Mon Sep 17 00:00:00 2001 From: xiaowei Date: Sat, 30 May 2026 04:57:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20distill=20=E6=94=AF=E6=8C=81=20reasonin?= =?UTF-8?q?g=20=E6=A8=A1=E5=9E=8B=20+=20LLM=5FENDPOINT=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20-=20engine.go:=20=E8=A7=A3=E6=9E=90=20LLM=20?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E6=97=B6=20content=20=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E5=88=99=E7=94=A8=20reasoning=5Fcontent=20-=20engine.go:=20Mes?= =?UTF-8?q?sage=20=E7=BB=93=E6=9E=84=E4=BD=93=E5=8A=A0=20ReasoningContent?= =?UTF-8?q?=20=E5=AD=97=E6=AE=B5=20-=20service:=20LLM=5FENDPOINT/LLM=5FMOD?= =?UTF-8?q?EL/LLM=5FAPI=5FKEY=20=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=20-?= =?UTF-8?q?=20=E6=A8=A1=E5=9E=8B:=20glm-4.7-flash=20(localhost:3000=20v1?= =?UTF-8?q?=20proxy)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/internal/distill/engine.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/go/internal/distill/engine.go b/go/internal/distill/engine.go index ee9ff72..2a3c1db 100644 --- a/go/internal/distill/engine.go +++ b/go/internal/distill/engine.go @@ -256,7 +256,8 @@ func (e *Engine) callLLM5D(content string) (FiveDScore, error) { var result struct { Choices []struct { Message struct { - Content string `json:"content"` + Content string `json:"content"` + ReasoningContent string `json:"reasoning_content"` } `json:"message"` } `json:"choices"` } @@ -270,7 +271,11 @@ func (e *Engine) callLLM5D(content string) (FiveDScore, error) { } var score FiveDScore - json.Unmarshal([]byte(result.Choices[0].Message.Content), &score) + llmContent := result.Choices[0].Message.Content + if llmContent == "" { + llmContent = result.Choices[0].Message.ReasoningContent + } + json.Unmarshal([]byte(llmContent), &score) return score, nil }