| | |
| | | import cc.mrbird.febs.ai.service.AiProductRoleService; |
| | | import cc.mrbird.febs.ai.service.AiService; |
| | | import cc.mrbird.febs.ai.service.AiTalkItemService; |
| | | import cc.mrbird.febs.ai.strategy.enumerates.LlmStrategyContextEnum; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.mall.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | |
| | | private final AiProductRoleService aiProductRoleService; |
| | | private final ObjectMapper objectMapper; |
| | | private final AiTalkItemService aiTalkItemService; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | |
| | | @Value("${ai.service.ak}") |
| | | private String ak; |
| | |
| | | if (service != null) { |
| | | service.shutdownExecutor(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Integer getSystemSetAiType() { |
| | | Integer type = 2; |
| | | DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | LlmStrategyContextEnum.LLM_STRATEGY.getCode(), |
| | | LlmStrategyContextEnum.LLM_STRATEGY.getCode() |
| | | ); |
| | | if (dataDictionaryCustom != null) { |
| | | type = Integer.parseInt(dataDictionaryCustom.getValue()); |
| | | } |
| | | return type; |
| | | } |
| | | |
| | | @Override |
| | |
| | | content = message.getContent().toString(); |
| | | } |
| | | apiMemberTalkStreamVo.setContent(content); |
| | | System.out.print(content); |
| | | log.debug("Content: {}", content); |
| | | |
| | | return new FebsResponse().success().data(apiMemberTalkStreamVo); |