瀏覽代碼

fix: 修复ollamaChatHandler中ReasoningContent字段的赋值逻辑

somnifex 9 月之前
父節點
當前提交
05241aea92
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      relay/channel/ollama/stream.go

+ 1 - 1
relay/channel/ollama/stream.go

@@ -189,7 +189,7 @@ func ollamaChatHandler(c *gin.Context, info *relaycommon.RelayInfo, resp *http.R
     if finishReason == "" { finishReason = "stop" }
 
     msg := dto.Message{Role: "assistant", Content: contentPtr(content)}
-    if rc := reasoningBuilder.String(); rc != "" { msg.ReasoningContent = &rc }
+    if rc := reasoningBuilder.String(); rc != "" { msg.ReasoningContent = rc }
     full := dto.OpenAITextResponse{
         Id:      common.GetUUID(),
         Model:   model,