fix(llm): 修复模型训练调用返回值解析
- 修改了错误信息的判断逻辑,从 contains 改为 containsKey - 添加了日志输出,便于调试和排查问题
This commit is contained in:
parent
0a1b8dcf0a
commit
08c82dbb83
@ -12,6 +12,7 @@ import kong.unirest.Unirest;
|
||||
import kong.unirest.UnirestException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lombok.var;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -247,7 +248,8 @@ public class TrainHttpService {
|
||||
JSONObject parseObject = JSON.parseObject(res);
|
||||
ModelDeployRespVO modelDeployRespVO=new ModelDeployRespVO();
|
||||
|
||||
if(parseObject.getString("res").contains("error")){
|
||||
log.info("--- {}",parseObject);
|
||||
if(parseObject.containsKey("error") ){
|
||||
modelDeployRespVO.setMessage("error");
|
||||
return modelDeployRespVO;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user