mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
[improvement](chat) fix SqlGeneration format issues (#538)
This commit is contained in:
@@ -63,8 +63,7 @@ public class OnePassSCSqlGeneration implements SqlGeneration, InitializingBean {
|
||||
Pair<String, Map<String, Double>> linkingMap = OutputFormat.selfConsistencyVote(candidateSortedList);
|
||||
List<String> sqlList = llmResults.stream()
|
||||
.map(llmResult -> OutputFormat.getSql(llmResult)).collect(Collectors.toList());
|
||||
List<String> sqlListSortedList = OutputFormat.formatList(sqlList);
|
||||
Pair<String, Map<String, Double>> sqlMap = OutputFormat.selfConsistencyVote(sqlListSortedList);
|
||||
Pair<String, Map<String, Double>> sqlMap = OutputFormat.selfConsistencyVote(sqlList);
|
||||
log.info("linkingMap result:{},sqlMap:{}", linkingMap, sqlMap);
|
||||
return sqlMap.getRight();
|
||||
}
|
||||
|
||||
@@ -68,8 +68,7 @@ public class TwoPassSCSqlGeneration implements SqlGeneration, InitializingBean {
|
||||
sqlTaskPool.add(result);
|
||||
});
|
||||
//4.format response.
|
||||
List<String> sqlTaskSortedList = OutputFormat.formatList(sqlTaskPool);
|
||||
Pair<String, Map<String, Double>> sqlMap = OutputFormat.selfConsistencyVote(sqlTaskSortedList);
|
||||
Pair<String, Map<String, Double>> sqlMap = OutputFormat.selfConsistencyVote(sqlTaskPool);
|
||||
log.info("linkingMap result:{},sqlMap:{}", linkingMap, sqlMap);
|
||||
return sqlMap.getRight();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user