Commit 34d7fe08 authored by yangyw's avatar yangyw

feature: 修改热门问题关联助手

parent 1999bb9c
...@@ -421,7 +421,9 @@ public class AppChatCompletionService { ...@@ -421,7 +421,9 @@ public class AppChatCompletionService {
// 获取随机问题 // 获取随机问题
final List<HotQaMobileDto> hots = Lists.newArrayList(); final List<HotQaMobileDto> hots = Lists.newArrayList();
PageResult<HotQaMobileDto> pageResult = kbService.hotQaList(new QaAssistantRequestDto()); QaAssistantRequestDto assistantRequestDto = new QaAssistantRequestDto();
assistantRequestDto.setAssistantId(request.getAssistantId());
PageResult<HotQaMobileDto> pageResult = kbService.hotQaList(assistantRequestDto);
if(Objects.nonNull(pageResult) && CollectionUtil.isNotEmpty(pageResult.getItems())) { if(Objects.nonNull(pageResult) && CollectionUtil.isNotEmpty(pageResult.getItems())) {
List<HotQaMobileDto> items = pageResult.getItems(); List<HotQaMobileDto> items = pageResult.getItems();
if(items.size() > 2){ if(items.size() > 2){
...@@ -430,7 +432,9 @@ public class AppChatCompletionService { ...@@ -430,7 +432,9 @@ public class AppChatCompletionService {
} }
hots.addAll(items); hots.addAll(items);
} }
List<HotQaResponseModel> hotQaList = chatCompletionService.hotQaList(new HotQaRequestModel()); HotQaRequestModel hotQaRequestModel = new HotQaRequestModel();
hotQaRequestModel.setAssistantId(request.getAssistantId());
List<HotQaResponseModel> hotQaList = chatCompletionService.hotQaList(hotQaRequestModel);
if(CollectionUtil.isNotEmpty(hotQaList)) { if(CollectionUtil.isNotEmpty(hotQaList)) {
Collections.shuffle(hotQaList); Collections.shuffle(hotQaList);
if(hotQaList.size() > 2) { if(hotQaList.size() > 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment