From 1f5878ed5be8e00e181777cbb04b1b4328cad612 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 24 Apr 2024 17:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4controller=20swagger=20?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/controller/ChatController.java | 2 +- .../ChatConversationController.java | 2 +- .../ai/controller/ChatMessageController.java | 22 +++++++++++++++++++ .../ai/controller/ChatRoleController.java | 9 ++++++-- 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatMessageController.java diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java index d9f2d2b97..9b7f9f3a9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java @@ -29,7 +29,7 @@ import java.util.function.Consumer; * @time 2024/4/13 17:44 * @since 1.0 */ -@Tag(name = "AI模块") +@Tag(name = "A1-AI聊天") @RestController @RequestMapping("/ai") @Slf4j diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java index 2133ccb60..ffd75cd44 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java @@ -22,7 +22,7 @@ import java.util.List; * @time 2024/4/13 17:44 * @since 1.0 */ -@Tag(name = "A2聊天-对话") +@Tag(name = "A2-聊天-对话") @RestController @RequestMapping("/ai/chat/conversation") @Slf4j diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatMessageController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatMessageController.java new file mode 100644 index 000000000..227932e78 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatMessageController.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.ai.controller; + +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * chat message + * + * @author fansili + * @time 2024/4/24 17:22 + * @since 1.0 + */ +@Tag(name = "A3-聊天-对话") +@RestController +@RequestMapping("/ai/chat/conversation") +@Slf4j +@AllArgsConstructor +public class ChatMessageController { +} diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java index 4b3e61c09..fbd3ae779 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java @@ -1,10 +1,13 @@ package cn.iocoder.yudao.module.ai.controller; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.ai.service.ChatRoleService; import cn.iocoder.yudao.module.ai.vo.*; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -14,8 +17,10 @@ import org.springframework.web.bind.annotation.*; * @fansili * @since v1.0 */ +@Tag(name = "A4-chat角色") @RestController -@RequestMapping("/chat-role") +@RequestMapping("/ai/chat/role") +@Slf4j @AllArgsConstructor public class ChatRoleController { @@ -23,7 +28,7 @@ public class ChatRoleController { @Operation(summary = "chat角色 - 角色列表") @GetMapping("/list") - public CommonResult list(@Validated @ModelAttribute ChatRoleListReq req) { + public PageResult list(@Validated @ModelAttribute ChatRoleListReq req) { return chatRoleService.list(req); }