add 增加校验

This commit is contained in:
zeyu xu
2024-03-21 23:59:23 +08:00
parent 57fc9a9b7e
commit b8c6a6a626

View File

@@ -80,7 +80,12 @@ namespace AntSK.Pages.Setting.AIModel
/// </summary>
private void HandleStartService()
{
llamaFactoryIsStart=true;
if (string.IsNullOrEmpty(_aiModel.ModelName))
{
_ = Message.Error("请先选择模型!", 2);
return;
}
llamaFactoryIsStart =true;
_ILLamaFactoryService.StartProcess(_aiModel.ModelName, "default");
}