fix:升级swagger注解

This commit is contained in:
litianxiang
2025-12-11 10:35:08 +08:00
parent a643338916
commit 9c19d061be
27 changed files with 459 additions and 459 deletions

View File

@@ -5,8 +5,8 @@ import com.ai.da.common.response.Response;
import com.ai.da.mapper.primary.entity.ChatMessage;
import com.ai.da.model.dto.*;
import com.ai.da.service.LLMService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@@ -17,7 +17,7 @@ import jakarta.annotation.Resource;
import java.util.*;
@Api(tags = "llm模块")
@Tag(name = "llm模块")
@Slf4j
@RestController
@RequestMapping("/api/llm")
@@ -26,7 +26,7 @@ public class LLMController {
@Resource
private LLMService llmService;
@ApiOperation(value = "对话")
@Operation(summary = "对话")
@CrossOrigin
@GetMapping(value = "/stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public SseEmitter streamPrompt(@RequestParam String prompt,
@@ -39,7 +39,7 @@ public class LLMController {
return llmService.stream(prompt, projectId, fileUrl, imageUrlList, token, enableThinking, process);
}
@ApiOperation(value = "对话")
@Operation(summary = "对话")
@CrossOrigin
@GetMapping(value = "/streamNew", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public SseEmitter streamNew(@RequestParam String prompt,
@@ -52,7 +52,7 @@ public class LLMController {
return llmService.streamNew(prompt, projectId, fileUrl, imageUrlList, token, enableThinking, process);
}
@ApiOperation(value = "对话创建项目")
@Operation(summary = "对话创建项目")
@GetMapping(value = "/chatCreateProject")
public Response<Long> chatCreateProject(@RequestParam String prompt, @RequestParam String process,
@RequestParam(required = false) String fileUrl,
@@ -60,13 +60,13 @@ public class LLMController {
return Response.success(llmService.chatCreateProject(prompt, process, fileUrl, imageUrlList));
}
@ApiOperation(value = "上传文件")
@Operation(summary = "上传文件")
@PostMapping(value = "/uploadFile")
public Response<List<String>> uploadFile(@RequestParam("file") MultipartFile file) {
return Response.success(llmService.uploadFile(file));
}
@ApiOperation(value = "获取历史聊天记录")
@Operation(summary = "获取历史聊天记录")
@PostMapping(value = "/getChatHistory")
public Response<PageBaseResponse<ChatMessage>> getChatHistory(@RequestBody ChatHistoryDTO chatHistoryDTO) {
return Response.success(llmService.getChatHistory(chatHistoryDTO));