diff --git a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/ModelService.java b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/ModelService.java index c73558473..39f849fe2 100644 --- a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/ModelService.java +++ b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/ModelService.java @@ -223,7 +223,7 @@ public class ModelService { if (StringUtils.isBlank(line)) { continue; } - line = line.replaceAll("\n", " "); + log.info("接收到的响应行数据: {}", line); line = line.replaceAll("\n", " "); String content = parseStreamLine(line); @@ -266,6 +266,7 @@ public class ModelService { if (delta != null) { // 获取 content 的值 String content = delta.getString("content"); + content = content.replaceAll("\n", " "); return "{\"content\":\"" + content + "\",\"finish_reason\":\"" + false + "\"}"; } }