mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
Feature/Refactor querySelect to queryRanker and fix some errors in integration tests (#369)
* (fix) (chat) fix the context saving failure caused by the loss of default values caused by @builder * (fix) (chat) fix date and metrics result in parse info in integration test * (improvement) (chat) refactor querySelect to queryRanker --------- Co-authored-by: jolunoluo
This commit is contained in:
@@ -13,8 +13,8 @@ public class ExecuteQueryReq {
|
||||
private Integer agentId;
|
||||
private Integer chatId;
|
||||
private String queryText;
|
||||
private Long queryId = 7L;
|
||||
private Integer parseId = 2;
|
||||
private Long queryId;
|
||||
private Integer parseId;
|
||||
private SemanticParseInfo parseInfo;
|
||||
private boolean saveAnswer = true;
|
||||
private boolean saveAnswer;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.chat.api.pojo.SemanticParseInfo;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
@@ -19,8 +20,8 @@ public class ParseResp {
|
||||
private String queryText;
|
||||
private Long queryId;
|
||||
private ParseState state;
|
||||
private List<SemanticParseInfo> selectedParses;
|
||||
private List<SemanticParseInfo> candidateParses;
|
||||
private List<SemanticParseInfo> selectedParses = Lists.newArrayList();
|
||||
private List<SemanticParseInfo> candidateParses = Lists.newArrayList();
|
||||
private List<SolvedQueryRecallResp> similarSolvedQuery;
|
||||
private ParseTimeCostDO parseTimeCost;
|
||||
|
||||
@@ -29,4 +30,11 @@ public class ParseResp {
|
||||
PENDING,
|
||||
FAILED
|
||||
}
|
||||
|
||||
public List<SemanticParseInfo> getSelectedParses() {
|
||||
selectedParses = Lists.newArrayList();
|
||||
selectedParses.addAll(candidateParses);
|
||||
candidateParses.clear();
|
||||
return selectedParses;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user