diff --git a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/controller/admin/dataset/DatasetController.java b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/controller/admin/dataset/DatasetController.java index 27b9068cf..cd4dc1bf4 100644 --- a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/controller/admin/dataset/DatasetController.java +++ b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/controller/admin/dataset/DatasetController.java @@ -23,7 +23,9 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.*; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; import java.net.URLEncoder; import java.util.List; @@ -102,7 +104,7 @@ public class DatasetController { @GetMapping("/download-example") @Operation(summary = "下载示例文件") - public ResponseEntity downloadExampleFile(@RequestParam("type") int type, HttpServletResponse response) throws IOException { + public ResponseEntity downloadExampleFile (@RequestParam("type") int type, HttpServletResponse response) throws IOException { FileInfoVO fileInfo = getFileInfo(type); // 从 resources/file/dataset_example 目录加载文件 @@ -121,7 +123,7 @@ public class DatasetController { .body(new InputStreamResource(inputStream)); } - private FileInfoVO getFileInfo(int type) { + private FileInfoVO getFileInfo (int type) { switch (type) { case 1: return new FileInfoVO("dataset_example_txt.txt", "text/plain");