mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-15 04:43:40 +00: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.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.ruoyi.common.chat.entity.chat.tool.ToolCalls;
|
import org.ruoyi.common.chat.entity.chat.tool.ToolCalls;
|
||||||
|
|
||||||
@@ -20,6 +21,8 @@ import java.util.List;
|
|||||||
public class Message extends BaseMessage implements Serializable {
|
public class Message extends BaseMessage implements Serializable {
|
||||||
|
|
||||||
private Object content;
|
private Object content;
|
||||||
|
@JsonProperty("reasoning_content")
|
||||||
|
private String reasoningContent;
|
||||||
|
|
||||||
public static Builder builder() {
|
public static Builder builder() {
|
||||||
return new Builder();
|
return new Builder();
|
||||||
|
|||||||
@@ -106,7 +106,8 @@ public class SSEEventSourceListener extends EventSourceListener {
|
|||||||
}
|
}
|
||||||
Object content = completionResponse.getChoices().get(0).getDelta().getContent();
|
Object content = completionResponse.getChoices().get(0).getDelta().getContent();
|
||||||
if(content == null){
|
if(content == null){
|
||||||
return;
|
content = completionResponse.getChoices().get(0).getDelta().getReasoningContent();
|
||||||
|
if(content == null) return;
|
||||||
}
|
}
|
||||||
if(StringUtils.isEmpty(modelName)){
|
if(StringUtils.isEmpty(modelName)){
|
||||||
modelName = completionResponse.getModel();
|
modelName = completionResponse.getModel();
|
||||||
|
|||||||
Reference in New Issue
Block a user