Commit 905ce773e92b811c343853931bebfc0f8b896360

Authored by cherishsince
1 parent efab5517

优化swagger 注释

yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/vo/ChatReq.java
1 1 package cn.iocoder.yudao.module.ai.vo;
2 2  
3   -import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum;
4 3 import io.swagger.v3.oas.annotations.media.Schema;
5 4 import jakarta.validation.constraints.NotNull;
6 5 import jakarta.validation.constraints.Size;
... ... @@ -18,14 +17,25 @@ import lombok.experimental.Accessors;
18 17 @Accessors(chain = true)
19 18 public class ChatReq {
20 19  
  20 + @Schema(description = "chat角色模板")
  21 + private Long chatRoleId;
  22 +
  23 + @Schema(description = "对话Id")
  24 + private Long conversationId;
  25 +
  26 + @Schema(description = "对话类型(new、continue),如果是new会创建一个新的对话,continue就会继续对话!")
  27 + @NotNull(message = "对话类型,不能为空!")
  28 + private String conversationType;
21 29  
22 30 @NotNull(message = "提示词不能为空!")
23   - @Size(max = 3000, message = "提示词最大3000个字符!")
  31 + @Size(max = 5000, message = "提示词最大5000个字符!")
24 32 @Schema(description = "填入固定值,1 issues, 2 pr")
25 33 private String prompt;
26 34  
27   - @Schema(description = "chat角色模板")
28   - private Long chatRoleId;
  35 + @Schema(description = "ai模型(查看 AiClientNameEnum)")
  36 + @NotNull(message = "模型不能为空!")
  37 + @Size(max = 30, message = "模型字符最大30个字符!")
  38 + private String modal;
29 39  
30 40 @Schema(description = "用于控制随机性和多样性的温度参数")
31 41 private Double temperature;
... ... @@ -38,15 +48,4 @@ public class ChatReq {
38 48 @Schema(description = "在生成消息时采用的Top-K采样大小,表示模型生成回复时考虑的候选项集合的大小")
39 49 private Double topK;
40 50  
41   - @Schema(description = "ai模型(查看 AiClientNameEnum)")
42   - @NotNull(message = "模型不能为空!")
43   - @Size(max = 30, message = "模型字符最大30个字符!")
44   - private String modal;
45   -
46   - @Schema(description = "对话类型(new、continue)")
47   - @NotNull(message = "对话类型,不能为空!")
48   - private String conversationType;
49   -
50   - @Schema(description = "对话Id")
51   - private Long conversationId;
52 51 }
... ...