diff --git a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/TrainHttpService.java b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/TrainHttpService.java index cd1a68112..749658933 100644 --- a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/TrainHttpService.java +++ b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/http/TrainHttpService.java @@ -11,23 +11,17 @@ import kong.unirest.HttpResponse; import kong.unirest.Unirest; import kong.unirest.UnirestException; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.io.IOException; import java.io.InputStream; -import java.net.ConnectException; -import java.net.SocketTimeoutException; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; - /** * 训练相关接口 */ @@ -359,10 +353,24 @@ public class TrainHttpService { public String getCheckFileList (String url, String name) { try { + log.info("开始获取文件列表 | URL参数: {}, Name参数: {}", url, name); String checkFileList = llmBackendProperties.getCheckFileList(); - return HttpUtils.get(url + checkFileList + name, null); - }catch (Exception e){ - log.error("获取文件列表失败:{}", e.getMessage()); + String fullUrl = url + checkFileList + name; + log.info("请求完整路径: {}", fullUrl); + + long startTime = System.currentTimeMillis(); + String result = HttpUtils.get(fullUrl, null); + long duration = System.currentTimeMillis() - startTime; + + log.info("HTTP请求完成 | 耗时: {}ms | 结果长度: {}", duration, (result != null ? result.length() : 0)); + if (result != null) { + log.info("结果摘要: {}", result.substring(0, Math.min(result.length(), 50))); + } else { + log.warn("返回空值"); + } + return result; + } catch (Exception e) { + log.error("获取文件列表异常 | URL: {} | Name: {} | 错误详情: {}", url, name, e.getMessage(), e); return null; } }