Browse Source

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

somnifex 5 tháng trước cách đây
mục cha
commit
1dd78b83b7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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,