Skip to content

Commit

Permalink
(improvement)(chat) Fix modelId to viewId in QueryReq (#773)
Browse files Browse the repository at this point in the history
Co-authored-by: jolunoluo
  • Loading branch information
lxwcodemonkey authored Feb 27, 2024
1 parent 26260c7 commit 6b6e54e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public List<SearchResult> search(QueryReq queryReq) {
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);
Expand All @@ -123,7 +123,7 @@ public List<SearchResult> search(QueryReq queryReq) {
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,
Expand Down

0 comments on commit 6b6e54e

Please sign in to comment.