| | |
| | | package cn.iocoder.yudao.module.ai.controller.admin.model.vo.apikey; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | import java.util.*; |
| | | import jakarta.validation.constraints.*; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import lombok.Data; |
| | | |
| | | @Schema(description = "管理后台 - AI API 密钥新增/修改 Request VO") |
| | | @Data |
| | | public class AiApiKeySaveReqVO { |
| | | |
| | | @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23538") |
| | | @Schema(description = "编号", example = "1") |
| | | private Long id; |
| | | |
| | | @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "文心一言") |
| | | @NotEmpty(message = "名称不能为空") |
| | | @Schema(description = "密钥名称", example = "通义千问") |
| | | @NotEmpty(message = "密钥名称不能为空") |
| | | private String name; |
| | | |
| | | @Schema(description = "密钥", requiredMode = Schema.RequiredMode.REQUIRED, example = "ABC") |
| | | @NotEmpty(message = "密钥不能为空") |
| | | @Schema(description = "API 密钥", example = "sk-xxx") |
| | | @NotEmpty(message = "API 密钥不能为空") |
| | | private String apiKey; |
| | | |
| | | @Schema(description = "平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") |
| | | @Schema(description = "平台", example = "TongYi") |
| | | @NotEmpty(message = "平台不能为空") |
| | | private String platform; |
| | | |
| | | @Schema(description = "自定义 API 地址", example = "https://aip.baidubce.com") |
| | | @Schema(description = "API 地址") |
| | | private String url; |
| | | |
| | | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| | | @NotNull(message = "状态不能为空") |
| | | @Schema(description = "状态", example = "0") |
| | | private Integer status; |
| | | |
| | | } |
| | | } |