refactor(yudao-module-llm): 调整模型服务日志输出顺序
- 将行数初始化移至循环开始前
This commit is contained in:
parent
16338b56d6
commit
a3944bdf77
@ -279,13 +279,13 @@ public class ModelService {
|
||||
try (InputStream inputStream = responseEntity.getContent();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
|
||||
String line;
|
||||
int i = 0;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
if (StringUtils.isBlank(line)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
log.info("接收到的响应行数据: {}", line);
|
||||
int i = 0;
|
||||
if (!"data: [DONE]".equals(line)) {
|
||||
String jsonData = line.substring(line.indexOf("{"));
|
||||
JSONObject jsonObject = JSON.parseObject(jsonData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user