Merge remote-tracking branch 'origin/master'

This commit is contained in:
Liuyang 2025-03-06 10:35:09 +08:00
commit 51f008a6a7

View File

@ -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);