(improvement)(chat) Fix modelId to viewId in QueryReq (#773)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-02-27 21:42:40 +08:00
committed by GitHub
parent 26260c79f1
commit 6b6e54e95f
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ import lombok.Data;
public class QueryReq {
private String queryText;
private Integer chatId;
private Long modelId;
private Long viewId;
private User user;
private QueryFilters queryFilters;
private boolean saveAnswer = true;

View File

@@ -97,7 +97,7 @@ public class SearchServiceImpl implements SearchService {
List<S2Term> originals = knowledgeService.getTerms(queryText);
log.info("hanlp parse result: {}", originals);
MapperHelper mapperHelper = ContextUtils.getBean(MapperHelper.class);
Set<Long> detectViewIds = mapperHelper.getViewIds(queryReq.getModelId(), agentService.getAgent(agentId));
Set<Long> detectViewIds = mapperHelper.getViewIds(queryReq.getViewId(), agentService.getAgent(agentId));
QueryContext queryContext = new QueryContext();
BeanUtils.copyProperties(queryReq, queryContext);
@@ -123,7 +123,7 @@ public class SearchServiceImpl implements SearchService {
Set<SearchResult> searchResults = new LinkedHashSet();
ViewInfoStat modelStat = NatureHelper.getViewStat(originals);
List<Long> possibleModels = getPossibleModels(queryReq, originals, modelStat, queryReq.getModelId());
List<Long> possibleModels = getPossibleModels(queryReq, originals, modelStat, queryReq.getViewId());
// 5.1 priority dimension metric
boolean existMetricAndDimension = searchMetricAndDimension(new HashSet<>(possibleModels), modelToName,