diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java index 958e3ba..5a509dc 100644 --- a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java @@ -16,7 +16,9 @@ public interface FunctionConstants { enum TypeEnum { /**跳转页面**/ JUMP("1"), + /**链接**/ LINK("2"), + /**参数**/ PARAMS("3") ; @Getter diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java index 1222533..1914df5 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java @@ -137,7 +137,9 @@ public class InteractiveServiceImpl implements IInteractiveService { Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> { throw new ServiceException("远程调用大模型【获取问题答案】接口失败!"); }); - JSONArray.parseArray(response.body(),AnswerVO.class).forEach(answerVO -> { + + List result = JSONArray.parseArray(response.body(), AnswerVO.class); + result.stream().filter(answerVO -> answerVO.getRunning() == 0).forEach(answerVO -> { String[] extras = answerVO.getExtra(); if(ObjectUtil.isEmpty(answerVO.getExtra()) || extras.length == 0){ return; @@ -145,7 +147,7 @@ public class InteractiveServiceImpl implements IInteractiveService { List extraList = Arrays.stream(extras).map(extraResolveStrategyService::resolve).map(JSON::toJSONString).collect(Collectors.toList()); answerVO.setExtra(extraList.toArray(new String[extraList.size()])); }); - return JSONArray.parseArray(response.body(),AnswerVO.class); + return result; } @Override