public AiResponseVo getInfoBykeyword(Ainologinparamdto ainologinparamdto) throws Exception{
String param =JSON.toJSONString(ainologinparamdto);
Map<string,string> headers =null;
String url =aiApiProperties.getChatbotUrl();
String result =Okhttp3Util.postJson(uRL, param ,headers);
AiResponseVo answerAIVO = JSONObject.parseObject(result,AiresponseVo.class);
if (answerAIVO.getSuccess()) {
if(StrUtil.isNotBlakn(answerAIVO.getAudio_response())){
String base64Mp3 = answerAIVO.getAudio_response();
String base64Data =base64Mp3.split(",").length>1?
base64Mp3.split(",")[1]:
base64Mp3;
byte[] base64DataByte = Base64.getDecoder().decode(base64Data);
MultipartFile multipartFile=MultipartFileConverter.byteConvertToMultipartFile(binarydata,"audio.wav","audio/wav");
Ossobject ossobject=ossHelper.upload(multipartFile, ossConfig.getBucketName(),true);
answerAIVO.setAdio_path(ossobject.getFileUrl());
}
return answerAIVO;
}else {
throw new BusinessException(answerAIVO,getMassage());
}
}