refactor(yudao-module-llm): 调整模型服务日志输出顺序

- 将行数初始化移至循环开始前 保持代码结构清晰,提高可读性和维护性
This commit is contained in:
sunxiqing 2025-03-06 11:00:47 +08:00
parent a3944bdf77
commit 38ec339230

View File

@ -300,7 +300,7 @@ public class ModelService {
i++;
}
}
if (i!=1) {
if (i!=1 && i!=2) {
line = line.replaceAll("\n", " ");
String content = parseStreamLine(line, uuid,groupId);
if (content != null) {
@ -314,6 +314,8 @@ public class ModelService {
if (content != null) {
result.append(chatReqVO.getContent());
}
}else if (i == 2){
i++;
}
// // 心跳检测