mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-03-30 04:53:49 +08:00
增加deepseek深度思考返回
This commit is contained in:
@@ -2,6 +2,7 @@ package org.ruoyi.common.chat.entity.chat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import org.ruoyi.common.chat.entity.chat.tool.ToolCalls;
|
||||
|
||||
@@ -20,6 +21,8 @@ import java.util.List;
|
||||
public class Message extends BaseMessage implements Serializable {
|
||||
|
||||
private Object content;
|
||||
@JsonProperty("reasoning_content")
|
||||
private String reasoningContent;
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
|
||||
@@ -106,7 +106,8 @@ public class SSEEventSourceListener extends EventSourceListener {
|
||||
}
|
||||
Object content = completionResponse.getChoices().get(0).getDelta().getContent();
|
||||
if(content == null){
|
||||
return;
|
||||
content = completionResponse.getChoices().get(0).getDelta().getReasoningContent();
|
||||
if(content == null) return;
|
||||
}
|
||||
if(StringUtils.isEmpty(modelName)){
|
||||
modelName = completionResponse.getModel();
|
||||
|
||||
Reference in New Issue
Block a user