|
@@ -625,6 +625,10 @@ public class GRPCController extends BaseController {
|
|
|
while (predictions.hasNext()) {
|
|
|
String responseStr = predictions.next().getPrediction().toStringUtf8();
|
|
|
// log.info("大模型问答返回的原始结果为{}", responseStr);
|
|
|
+ if(StringUtils.isBlank(responseStr)){
|
|
|
+ log.error("大模型返回的是空,无法解析");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
responseStr = JSON.parseObject(responseStr).getString("message");
|
|
|
//2024年7月13日14:30:19 为空字符串的(实际可能是\n这种的)也返回前端,否则样式有问题
|
|
|
if("complete".equals(responseStr) || Objects.isNull(responseStr)){
|