| | |
| | | package cn.iocoder.yudao.module.ai.controller.admin.model.vo.model; |
| | | |
| | | import cn.iocoder.yudao.module.ai.enums.model.AiModelTypeEnum; |
| | | import cn.iocoder.yudao.module.ai.enums.model.AiPlatformEnum; |
| | | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| | | import cn.iocoder.yudao.framework.common.validation.InEnum; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.Data; |
| | | |
| | | @Schema(description = "管理后台 - API 模型新增/修改 Request VO") |
| | | @Schema(description = "管理后台 - AI 模型新增/修改 Request VO") |
| | | @Data |
| | | public class AiModelSaveReqVO { |
| | | |
| | | @Schema(description = "编号", example = "2630") |
| | | @Schema(description = "编号", example = "1") |
| | | private Long id; |
| | | |
| | | @Schema(description = "API 秘钥编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22042") |
| | | @NotNull(message = "API 秘钥编号不能为空") |
| | | @Schema(description = "API 密钥编号", example = "1") |
| | | @NotNull(message = "API 密钥不能为空") |
| | | private Long keyId; |
| | | |
| | | @Schema(description = "模型名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") |
| | | @Schema(description = "模型名字", example = "通义千问") |
| | | @NotEmpty(message = "模型名字不能为空") |
| | | private String name; |
| | | |
| | | @Schema(description = "模型标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "gpt-3.5-turbo-0125") |
| | | @Schema(description = "模型标识", example = "qwen-plus") |
| | | @NotEmpty(message = "模型标识不能为空") |
| | | private String model; |
| | | |
| | | @Schema(description = "模型平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") |
| | | @Schema(description = "模型平台", example = "TongYi") |
| | | @NotEmpty(message = "模型平台不能为空") |
| | | @InEnum(AiPlatformEnum.class) |
| | | private String platform; |
| | | |
| | | @Schema(description = "模型类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| | | @Schema(description = "模型类型", example = "1") |
| | | @NotNull(message = "模型类型不能为空") |
| | | @InEnum(AiModelTypeEnum.class) |
| | | private Integer type; |
| | | |
| | | @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| | | @NotNull(message = "排序不能为空") |
| | | @Schema(description = "排序", example = "0") |
| | | private Integer sort; |
| | | |
| | | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| | | @InEnum(CommonStatusEnum.class) |
| | | @NotNull(message = "状态不能为空") |
| | | @Schema(description = "状态", example = "0") |
| | | private Integer status; |
| | | |
| | | @Schema(description = "温度参数", example = "1") |
| | | @Schema(description = "温度") |
| | | private Double temperature; |
| | | |
| | | @Schema(description = "单条回复的最大 Token 数量", example = "4096") |
| | | @Schema(description = "最大 Token 数") |
| | | private Integer maxTokens; |
| | | |
| | | @Schema(description = "上下文的最大 Message 数量", example = "8192") |
| | | @Schema(description = "最大上下文数") |
| | | private Integer maxContexts; |
| | | |
| | | } |
| | | } |