mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 05:43:51 +00:00
[improvement][chat]Incorporate Response into Context objects.
This commit is contained in:
@@ -120,7 +120,7 @@ public class RetrieveServiceImpl implements RetrieveService {
|
||||
return searchResults.stream().limit(RESULT_SIZE).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<Long> getPossibleDataSets(QueryNLReq queryCtx, List<S2Term> originals,
|
||||
private List<Long> getPossibleDataSets(QueryNLReq queryReq, List<S2Term> originals,
|
||||
Set<Long> dataSetIds) {
|
||||
if (CollectionUtils.isNotEmpty(dataSetIds)) {
|
||||
return new ArrayList<>(dataSetIds);
|
||||
@@ -128,8 +128,8 @@ public class RetrieveServiceImpl implements RetrieveService {
|
||||
|
||||
List<Long> possibleDataSets = NatureHelper.selectPossibleDataSets(originals);
|
||||
if (possibleDataSets.isEmpty()) {
|
||||
if (Objects.nonNull(queryCtx.getContextParseInfo())) {
|
||||
possibleDataSets.add(queryCtx.getContextParseInfo().getDataSetId());
|
||||
if (Objects.nonNull(queryReq.getContextParseInfo())) {
|
||||
possibleDataSets.add(queryReq.getContextParseInfo().getDataSetId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user