fix: 统一适配 DeepSeek 工具与思考历史回传
- 结构化持久化 assistant/tool 历史,恢复真实消息链回放 - 为 DeepSeek 显式开启 thinking 协议配置,并补齐 public-api 与工具英文名兜底 - 增加聊天历史回放、tool 名称与请求参数解析相关测试
This commit is contained in:
@@ -9,6 +9,7 @@ import tech.easyflow.chatlog.domain.dto.ChatMessageRecord;
|
||||
import tech.easyflow.chatlog.service.ChatPersistDispatcher;
|
||||
import tech.easyflow.chatlog.service.ChatSessionQueryService;
|
||||
import tech.easyflow.common.web.exceptions.BusinessException;
|
||||
import tech.easyflow.core.runtime.ChatRuntimeHistoryPayloadHelper;
|
||||
import tech.easyflow.core.runtime.ChatRuntimeContext;
|
||||
import tech.easyflow.core.runtime.ChatRuntimeListener;
|
||||
import tech.easyflow.core.runtime.ChatRuntimeMessage;
|
||||
@@ -81,7 +82,8 @@ public class ChatlogRuntimeListener implements ChatRuntimeListener {
|
||||
Collections.reverse(records);
|
||||
List<ChatRuntimeMessage> messages = new ArrayList<>(records.size());
|
||||
for (ChatMessageRecord record : records) {
|
||||
if (record.getContentText() == null || record.getContentText().isBlank()) {
|
||||
if ((record.getContentText() == null || record.getContentText().isBlank())
|
||||
&& !ChatRuntimeHistoryPayloadHelper.hasStructuredHistory(record.getContentPayload())) {
|
||||
continue;
|
||||
}
|
||||
ChatRuntimeMessage message = new ChatRuntimeMessage();
|
||||
|
||||
Reference in New Issue
Block a user