refactor(llm): 移除基础模型启动和禁用相关代码
- 注释掉 BaseModelController 中的 active 方法内的 updateReqVO.setIsActive(1) - 注释掉 BaseModelServiceImpl 中的 updateBaseModel 方法内的更新操作 - 注释掉禁用模型时的 updateReqVO.setIsActive(0) 和 updateBaseModel 调用
This commit is contained in:
parent
d95f612dc5
commit
c18bedcb68
@ -61,7 +61,7 @@ public class BaseModelController {
|
||||
@Operation(summary = "启动")
|
||||
// @PreAuthorize("@ss.hasPermission('llm:base-model:update')")
|
||||
public CommonResult<Boolean> active(@Valid @RequestBody BaseModelSaveReqVO updateReqVO) {
|
||||
updateReqVO.setIsActive(1);
|
||||
// updateReqVO.setIsActive(1);
|
||||
baseModelService.updateBaseModel(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
@ -101,8 +101,8 @@ public class BaseModelServiceImpl implements BaseModelService {
|
||||
String resStr = HttpUtils.post(llmBackendProperties.getDeployModel(), null,JSON.toJSONString(map));
|
||||
validateBaseModelExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BaseModelDO updateObj = BeanUtils.toBean(updateReqVO, BaseModelDO.class);
|
||||
baseModelMapper.updateById(updateObj);
|
||||
// BaseModelDO updateObj = BeanUtils.toBean(updateReqVO, BaseModelDO.class);
|
||||
// baseModelMapper.updateById(updateObj);
|
||||
}catch (Exception e){
|
||||
log.error("启动基础模型状态时发生异常: {}", e.getMessage(), e);
|
||||
}
|
||||
@ -176,8 +176,8 @@ public class BaseModelServiceImpl implements BaseModelService {
|
||||
map.put("deploy_id",deploy_id);
|
||||
String resStr = HttpUtils.post(llmBackendProperties.getDeleteModel(), null, JSON.toJSONString(deploy_id));
|
||||
// 禁用模型
|
||||
updateReqVO.setIsActive(0);
|
||||
updateBaseModel(updateReqVO);
|
||||
// updateReqVO.setIsActive(0);
|
||||
// updateBaseModel(updateReqVO);
|
||||
}catch (Exception e){
|
||||
log.error("禁用基础模型状态时发生异常: {}", e.getMessage(), e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user