From 95814e1f2bcb5590af0a943c77241896bbafb843 Mon Sep 17 00:00:00 2001 From: leon <800222@163.com> Date: Fri, 7 Mar 2025 17:22:57 +0800 Subject: [PATCH] delete \n --- .../iocoder/yudao/module/llm/service/http/ModelService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ce23b3a1f..28ca57519 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 @@ -304,7 +304,8 @@ public class ModelService { } } if (i!=1 && i!=2) { - line = line.replaceAll("\n", " "); +// line = line.replaceAll("\n", " "); + String content = parseStreamLine(line, uuid,groupId); if (content != null) { emitter.send( @@ -357,7 +358,7 @@ public class ModelService { if (delta != null) { // 获取 content 的值 String content = delta.getString("content"); - content = content.replaceAll("\n", " "); +// content = content.replaceAll("\n", " "); ChatReqVO chatReqVO = new ChatReqVO(); chatReqVO.setUuid(""); chatReqVO.setGroupId("");