From 2691f22a7a2543ea5efd94680df143de0645db10 Mon Sep 17 00:00:00 2001 From: luyie Date: Wed, 28 Aug 2024 17:09:14 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=99=BA=E8=B0=B1=E5=A4=A7=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bigmodel/zhipuai/constants/ErrorCode.java | 3 +- .../bigmodel/zhipuai/constants/ResultDataType.java | 30 +++++++++----- .../zhipuai/constants/ResultStrategyType.java | 6 +-- .../zhipuai/handler/ResultBooleanStrategy.java | 46 --------------------- .../zhipuai/handler/ResultCommonStrategy.java | 22 ---------- .../bigmodel/zhipuai/handler/ResultStrategy.java | 44 -------------------- .../zhipuai/handler/ZhipuAnalysisHandlerGlm4v.java | 2 +- .../handler/result/ResultBooleanStrategy.java | 47 ++++++++++++++++++++++ .../handler/result/ResultCommonStrategy.java | 22 ++++++++++ .../zhipuai/handler/result/ResultStrategy.java | 36 +++++++++++++++++ .../zhipuai/handler/result/data/BooleanParser.java | 12 ++++++ .../zhipuai/handler/result/data/IntegerParser.java | 12 ++++++ .../handler/result/data/ResultDataParser.java | 9 +++++ .../zhipuai/handler/result/data/StringParser.java | 12 ++++++ .../service/impl/ZhipuAnalysisServiceImpl.java | 2 +- 15 files changed, 177 insertions(+), 128 deletions(-) delete mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultBooleanStrategy.java delete mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultCommonStrategy.java delete mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultStrategy.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultBooleanStrategy.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultCommonStrategy.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultStrategy.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/BooleanParser.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/IntegerParser.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/ResultDataParser.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/StringParser.java diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ErrorCode.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ErrorCode.java index c6f5d74..02f55cb 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ErrorCode.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ErrorCode.java @@ -21,7 +21,8 @@ public enum ErrorCode implements IResultCode { UNKNOWN_ANALYSIS_TYPE(1888000007, "未知的识别类型"), NO_COMPARATOR(1888000008, "未获取到对比对象"), NO_COMPARISON_TYPE(1888000009, "未获取到对比类型"), - GET_RESULT_FAIL(1888000010, "获取结果失败"),; + GET_RESULT_FAIL(1888000010, "获取结果失败"), + NO_ANSWER_FROM_PLATFORM(1888000011, "未从平台获取到答案"); private final int code; private final String msg; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultDataType.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultDataType.java index e85b8b5..2f82a7e 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultDataType.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultDataType.java @@ -1,31 +1,41 @@ package com.hnac.hzims.bigmodel.zhipuai.constants; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.data.BooleanParser; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.data.IntegerParser; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.data.ResultDataParser; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.data.StringParser; import lombok.Getter; +import lombok.extern.slf4j.Slf4j; /** * @Author: ypj * @Date: 2024/8/14 8:28 */ @Getter +@Slf4j public enum ResultDataType implements BaseEnum { - OBJECT("Object", "Object类型", Object.class.getName(), null), - STRING("String", "String类型", String.class.getName(), null), - BOOLEAN("Boolean","Boolean类型",Boolean.class.getName(),"parseBoolean"), - INTEGER("Integer","Integer类型",Integer.class.getName(),"parseInt"); + STRING("String", "String类型", StringParser.class), + BOOLEAN("Boolean", "Boolean类型", BooleanParser.class), + INTEGER("Integer", "Integer类型", IntegerParser.class); private final String code; private final String msg; - private final String className; + private final Class parser; - private final String method; - - ResultDataType(String code, String msg, String className, String method) { + ResultDataType(String code, String msg, Class parser) { this.code = code; this.msg = msg; - this.className = className; - this.method = method; + this.parser = parser; } + public ResultDataParser getParser() { + try { + return parser.newInstance(); + } catch (Exception e) { + log.error("get result data parse fail", e); + } + return null; + } } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultStrategyType.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultStrategyType.java index 8532bb9..9f04f2f 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultStrategyType.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/constants/ResultStrategyType.java @@ -1,8 +1,8 @@ package com.hnac.hzims.bigmodel.zhipuai.constants; -import com.hnac.hzims.bigmodel.zhipuai.handler.ResultBooleanStrategy; -import com.hnac.hzims.bigmodel.zhipuai.handler.ResultCommonStrategy; -import com.hnac.hzims.bigmodel.zhipuai.handler.ResultStrategy; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.ResultBooleanStrategy; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.ResultCommonStrategy; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.ResultStrategy; import lombok.Getter; import lombok.extern.slf4j.Slf4j; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultBooleanStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultBooleanStrategy.java deleted file mode 100644 index 477c3a8..0000000 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultBooleanStrategy.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.hnac.hzims.bigmodel.zhipuai.handler; - -import com.hnac.hzims.bigmodel.zhipuai.constants.BaseEnum; -import com.hnac.hzims.bigmodel.zhipuai.constants.ComparisonType; -import com.hnac.hzims.bigmodel.zhipuai.constants.ErrorCode; -import com.hnac.hzims.bigmodel.zhipuai.constants.ResultStrategyType; -import com.hnac.hzims.bigmodel.zhipuai.entity.ZhipuAnalysisInfoEntity; -import org.springframework.util.Assert; - -import java.util.Objects; - -/** - * @Author: ypj - * @Date: 2024/8/14 7:41 - */ -public class ResultBooleanStrategy implements ResultStrategy { - @Override - public String getCode() { - return ResultStrategyType.BOOLEAN.getCode(); - } - - @Override - public Boolean getResult(ZhipuAnalysisInfoEntity info, Object resultData) { - Object comparator = convertOriginalData(info.getResultCondition(), info.getResultType()); - Assert.isTrue(Objects.nonNull(comparator), () -> { - throw ErrorCode.NO_COMPARATOR.throwException(); - }); - ComparisonType comparisonType = BaseEnum.getInstance(info.getResultJudgeModel(), ComparisonType.class); - Assert.isTrue(Objects.nonNull(comparisonType), () -> { - throw ErrorCode.NO_COMPARISON_TYPE.throwException(); - }); - switch (Objects.requireNonNull(comparisonType)) { - case EQUAL: - return comparator.equals(resultData); - case GREATER: - if (comparator instanceof Comparable && resultData instanceof Comparable) { - return ((Comparable) comparator).compareTo((Comparable)resultData) < 0; - } - break; - case LESS: - return ((Comparable) comparator).compareTo(resultData) > 0; - } - throw ErrorCode.GET_RESULT_FAIL.throwException(); - } - -} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultCommonStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultCommonStrategy.java deleted file mode 100644 index b1c21fe..0000000 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultCommonStrategy.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hnac.hzims.bigmodel.zhipuai.handler; - -import com.hnac.hzims.bigmodel.zhipuai.constants.ResultStrategyType; -import com.hnac.hzims.bigmodel.zhipuai.entity.ZhipuAnalysisInfoEntity; - -/** - * @Author: ypj - * @Date: 2024/8/13 10:33 - */ -public class ResultCommonStrategy implements ResultStrategy { - @Override - public String getCode() { - return ResultStrategyType.COMMON.getCode(); - } - - - @Override - public Object getResult(ZhipuAnalysisInfoEntity info, Object data) { - return data; - } - -} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultStrategy.java deleted file mode 100644 index b86adea..0000000 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ResultStrategy.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.hnac.hzims.bigmodel.zhipuai.handler; - -import com.hnac.hzims.bigmodel.zhipuai.constants.BaseEnum; -import com.hnac.hzims.bigmodel.zhipuai.constants.ResultDataType; -import com.hnac.hzims.bigmodel.zhipuai.entity.ZhipuAnalysisInfoEntity; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springblade.core.tool.utils.StringUtil; - -import java.lang.reflect.Method; - -/** - * @Author: ypj - * @Date: 2024/8/13 10:00 - */ -public interface ResultStrategy { - - String getCode(); - - default boolean isSupport(String strategyCode) { - return getCode().equals(strategyCode); - } - - default Object convertOriginalData(String originalData, String className) { - ResultDataType type = BaseEnum.getInstance(className, ResultDataType.class); - if (null != type && StringUtil.isNotBlank(type.getMethod())) { - try { - Class clazz = Class.forName(type.getClassName()); - Method method = clazz.getMethod(type.getMethod(), String.class); - return method.invoke(null, originalData); - } catch (Exception ignore) { - Logger logger = LoggerFactory.getLogger(ResultStrategy.class); - logger.info("parse data error", ignore); - } - } - return originalData; - } - - default T getResult(ZhipuAnalysisInfoEntity info, String originalValue) { - return getResult(info, convertOriginalData(originalValue, info.getResultType())); - } - - T getResult(ZhipuAnalysisInfoEntity info, Object resultData); -} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ZhipuAnalysisHandlerGlm4v.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ZhipuAnalysisHandlerGlm4v.java index 6e98f7b..36ad46c 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ZhipuAnalysisHandlerGlm4v.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/ZhipuAnalysisHandlerGlm4v.java @@ -73,7 +73,7 @@ public class ZhipuAnalysisHandlerGlm4v extends AbstractZhipuAnalysisHandler { ModelApiResponse response = sendRequest(text, url); log.info("get zhi pu ai response : {}", Optional.ofNullable(response).map(JsonUtil::toJson).orElse("null")); Assert.isTrue(Objects.nonNull(response) && response.isSuccess(), () -> { - throw ErrorCode.throwCommonException(Optional.ofNullable(response).map(ModelApiResponse::getMsg).orElse("没有收到大模型平台响应")); + throw ErrorCode.throwCommonException(Optional.ofNullable(response).map(ModelApiResponse::getMsg).orElse(ErrorCode.NO_ANSWER_FROM_PLATFORM.getMsg())); }); try { String resultJson = response.getData().getChoices().get(0).getMessage().getContent().toString(); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultBooleanStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultBooleanStrategy.java new file mode 100644 index 0000000..3b7e000 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultBooleanStrategy.java @@ -0,0 +1,47 @@ +package com.hnac.hzims.bigmodel.zhipuai.handler.result; + +import com.hnac.hzims.bigmodel.zhipuai.constants.BaseEnum; +import com.hnac.hzims.bigmodel.zhipuai.constants.ComparisonType; +import com.hnac.hzims.bigmodel.zhipuai.constants.ErrorCode; +import com.hnac.hzims.bigmodel.zhipuai.constants.ResultStrategyType; +import com.hnac.hzims.bigmodel.zhipuai.entity.ZhipuAnalysisInfoEntity; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.ResultStrategy; +import org.springframework.util.Assert; + +import java.util.Objects; + +/** + * @Author: ypj + * @Date: 2024/8/14 7:41 + */ +public class ResultBooleanStrategy implements ResultStrategy { + @Override + public String getCode() { + return ResultStrategyType.BOOLEAN.getCode(); + } + + @Override + public Boolean getResult(ZhipuAnalysisInfoEntity info, Object resultData) { + Object comparator = convertOriginalData(info.getResultCondition(), info.getResultType()); + Assert.isTrue(Objects.nonNull(comparator), () -> { + throw ErrorCode.NO_COMPARATOR.throwException(); + }); + ComparisonType comparisonType = BaseEnum.getInstance(info.getResultJudgeModel(), ComparisonType.class); + Assert.isTrue(Objects.nonNull(comparisonType), () -> { + throw ErrorCode.NO_COMPARISON_TYPE.throwException(); + }); + switch (Objects.requireNonNull(comparisonType)) { + case EQUAL: + return comparator.equals(resultData); + case GREATER: + if (comparator instanceof Comparable && resultData instanceof Comparable) { + return ((Comparable) comparator).compareTo((Comparable)resultData) < 0; + } + break; + case LESS: + return ((Comparable) comparator).compareTo(resultData) > 0; + } + throw ErrorCode.GET_RESULT_FAIL.throwException(); + } + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultCommonStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultCommonStrategy.java new file mode 100644 index 0000000..e506065 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultCommonStrategy.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.bigmodel.zhipuai.handler.result; + +import com.hnac.hzims.bigmodel.zhipuai.constants.ResultStrategyType; +import com.hnac.hzims.bigmodel.zhipuai.entity.ZhipuAnalysisInfoEntity; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.ResultStrategy; + +/** + * @Author: ypj + * @Date: 2024/8/13 10:33 + */ +public class ResultCommonStrategy implements ResultStrategy { + @Override + public String getCode() { + return ResultStrategyType.COMMON.getCode(); + } + + @Override + public Object getResult(ZhipuAnalysisInfoEntity info, Object data) { + return data; + } + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultStrategy.java new file mode 100644 index 0000000..90c6bbf --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/ResultStrategy.java @@ -0,0 +1,36 @@ +package com.hnac.hzims.bigmodel.zhipuai.handler.result; + +import com.hnac.hzims.bigmodel.zhipuai.constants.BaseEnum; +import com.hnac.hzims.bigmodel.zhipuai.constants.ResultDataType; +import com.hnac.hzims.bigmodel.zhipuai.entity.ZhipuAnalysisInfoEntity; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.data.ResultDataParser; + +import java.util.Optional; + +/** + * @Author: ypj + * @Date: 2024/8/13 10:00 + */ +public interface ResultStrategy { + + String getCode(); + + default boolean isSupport(String strategyCode) { + return getCode().equals(strategyCode); + } + + default Object convertOriginalData(String originalData, String className) { + ResultDataType type = BaseEnum.getInstance(className, ResultDataType.class); + if (null != type) { + ResultDataParser parser = type.getParser(); + return Optional.ofNullable(parser).map(p -> p.parse(originalData)).orElse(originalData); + } + return originalData; + } + + default T getResult(ZhipuAnalysisInfoEntity info, String originalValue) { + return getResult(info, convertOriginalData(originalValue, info.getResultType())); + } + + T getResult(ZhipuAnalysisInfoEntity info, Object resultData); +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/BooleanParser.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/BooleanParser.java new file mode 100644 index 0000000..1af115a --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/BooleanParser.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.bigmodel.zhipuai.handler.result.data; + +/** + * @Author: ypj + * @Date: 2024/8/28 16:12 + */ +public class BooleanParser implements ResultDataParser { + @Override + public Boolean parse(String originalData) { + return Boolean.parseBoolean(originalData); + } +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/IntegerParser.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/IntegerParser.java new file mode 100644 index 0000000..cc0cfe5 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/IntegerParser.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.bigmodel.zhipuai.handler.result.data; + +/** + * @Author: ypj + * @Date: 2024/8/28 16:46 + */ +public class IntegerParser implements ResultDataParser { + @Override + public Integer parse(String originalData) { + return Integer.parseInt(originalData); + } +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/ResultDataParser.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/ResultDataParser.java new file mode 100644 index 0000000..854e7e0 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/ResultDataParser.java @@ -0,0 +1,9 @@ +package com.hnac.hzims.bigmodel.zhipuai.handler.result.data; + +/** + * @Author: ypj + * @Date: 2024/8/28 16:04 + */ +public interface ResultDataParser { + T parse(String originalData); +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/StringParser.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/StringParser.java new file mode 100644 index 0000000..a9218e1 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/handler/result/data/StringParser.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.bigmodel.zhipuai.handler.result.data; + +/** + * @Author: ypj + * @Date: 2024/8/28 16:11 + */ +public class StringParser implements ResultDataParser { + @Override + public String parse(String originalData) { + return originalData; + } +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/service/impl/ZhipuAnalysisServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/service/impl/ZhipuAnalysisServiceImpl.java index 0afde6f..956f6f2 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/service/impl/ZhipuAnalysisServiceImpl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/zhipuai/service/impl/ZhipuAnalysisServiceImpl.java @@ -7,7 +7,7 @@ import com.hnac.hzims.bigmodel.zhipuai.constants.BaseEnum; import com.hnac.hzims.bigmodel.zhipuai.constants.ErrorCode; import com.hnac.hzims.bigmodel.zhipuai.constants.ResultStrategyType; import com.hnac.hzims.bigmodel.zhipuai.entity.ZhipuAnalysisInfoEntity; -import com.hnac.hzims.bigmodel.zhipuai.handler.ResultStrategy; +import com.hnac.hzims.bigmodel.zhipuai.handler.result.ResultStrategy; import com.hnac.hzims.bigmodel.zhipuai.handler.ZhipuAnalyser; import com.hnac.hzims.bigmodel.zhipuai.handler.ZhipuAnalysisFactory; import com.hnac.hzims.bigmodel.zhipuai.service.ZhipuAnalysisInfoService;