| | |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.dashscope.aigc.generation.Generation; |
| | | import com.alibaba.dashscope.aigc.generation.GenerationParam; |
| | | import com.alibaba.dashscope.aigc.generation.GenerationResult; |
| | |
| | | HashMap<String, String> stringStringHashMap = new HashMap<>(); |
| | | if (StrUtil.isNotEmpty(message.getOutput().getChoices().get(0).getMessage().getReasoningContent())){ |
| | | stringStringHashMap.put(LlmStrategyContextEnum.THINK.name(),message.getOutput().getChoices().get(0).getMessage().getReasoningContent()); |
| | | |
| | | System.out.print(message.getOutput().getChoices().get(0).getMessage().getReasoningContent()); |
| | | } |
| | | if (StrUtil.isNotEmpty(message.getOutput().getChoices().get(0).getMessage().getContent())){ |
| | | stringStringHashMap.put(LlmStrategyContextEnum.CONTENT.name(),message.getOutput().getChoices().get(0).getMessage().getContent()); |
| | | System.out.print(message.getOutput().getChoices().get(0).getMessage().getContent()); |
| | | } |
| | | return new FebsResponse().success().data(stringStringHashMap); |
| | | }) |