[improvement][chat]Only return the parse info of the highest score for one dataset pass.#1847

This commit is contained in:
jerryjzhang
2024-10-28 20:00:34 +08:00
parent de4384062c
commit e046a55567
2 changed files with 8 additions and 4 deletions

View File

@@ -119,6 +119,13 @@ public class ChatQueryServiceImpl implements ChatQueryService {
chatManageService.updateParseCostTime(parseContext.getResponse());
}
// no need for explicit user feedback if there is only one candidate parses
if (parseContext.needFeedback() && parseContext.getResponse().getSelectedParses().size() == 1) {
chatParseReq.setQueryId(parseContext.getResponse().getQueryId());
chatParseReq.setSelectedParse(parseContext.getResponse().getSelectedParses().get(0));
return parse(chatParseReq);
}
return parseContext.getResponse();
}