【调整】ai模型,增加sort排序
This commit is contained in:
parent
c21b5f7679
commit
3d7c994bf9
|
@ -43,8 +43,13 @@ public class AiChatModalDO extends BaseDO {
|
|||
* 禁用 0、正常 1、禁用
|
||||
*/
|
||||
private Integer disable;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* modal 配置(json)
|
||||
*/
|
||||
private String config;
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class AiChatModalServiceImpl implements AiChatModalService {
|
|||
queryWrapperX.like(AiChatModalDO::getName, req.getSearch().trim());
|
||||
}
|
||||
// 默认排序
|
||||
queryWrapperX.orderByDesc(AiChatModalDO::getId);
|
||||
queryWrapperX.orderByAsc(AiChatModalDO::getSort);
|
||||
// 查询
|
||||
PageResult<AiChatModalDO> aiChatModalDOPageResult = aiChatModalMapper.selectPage(req, queryWrapperX);
|
||||
// 转换 res
|
||||
|
|
|
@ -19,25 +19,29 @@ import java.util.Map;
|
|||
@Accessors(chain = true)
|
||||
public class AiChatModalAddReq {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "模型名字")
|
||||
@Size(max = 60, message = "模型名字最大60个字符")
|
||||
@NotNull(message = "模型名字不能为空!")
|
||||
private String name;
|
||||
|
||||
@NotNull
|
||||
@Size(max = 32, message = "模型平台最大32个字符")
|
||||
@Schema(description = "模型平台 参考 AiPlatformEnum")
|
||||
@NotNull(message = "平台不能为空!")
|
||||
private String platform;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "模型类型(qianwen、yiyan、xinghuo、openai)")
|
||||
@Size(max = 32, message = "模型类型最大32个字符")
|
||||
@NotNull(message = "modal模型不能为空!")
|
||||
private String modal;
|
||||
|
||||
@Schema(description = "模型照片")
|
||||
@Size(max = 256, message = "模型照片地址最大256个字符")
|
||||
private String imageUrl;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@NotNull(message = "sort排序不能为空!")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "模型配置JSON")
|
||||
// @Size(max = 1024, message = "模型配置最大1024个字符")
|
||||
private Map<String, Object> config;
|
||||
|
|
|
@ -34,6 +34,9 @@ public class AiChatModalListRes {
|
|||
@Schema(description = "禁用 0、正常 1、禁用")
|
||||
private Integer disable;
|
||||
|
||||
@Schema(description = "排序 asc 排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "modal 配置")
|
||||
private String config;
|
||||
}
|
||||
|
|
|
@ -10,10 +10,11 @@ Content-Type: application/json
|
|||
Authorization: {{token}}
|
||||
|
||||
{
|
||||
"name": "小红书Ai写作大模型-plus",
|
||||
"modal": "ERNIE-3.5-8K",
|
||||
"name": "小红书Ai写作大模型4.0",
|
||||
"modal": "ERNIE 4.0",
|
||||
"platform": "yiyan",
|
||||
"imageUrl": "",
|
||||
"sort": 100,
|
||||
"config": {
|
||||
"topK": 0.6,
|
||||
"topP": 0.6,
|
||||
|
@ -32,6 +33,7 @@ Authorization: {{token}}
|
|||
"modal": "ERNIE-3.5-8K",
|
||||
"platform": "yiyan",
|
||||
"imageUrl": "",
|
||||
"sort": 1,
|
||||
"config": {
|
||||
"topK": 0.6,
|
||||
"topP": 0.6,
|
||||
|
|
Loading…
Reference in New Issue