mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:18:23 +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();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ s2:
|
||||
chat-model:
|
||||
provider: open_ai
|
||||
openai:
|
||||
api-key: api_key
|
||||
api-key: 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
|
||||
model-name: gpt-3.5-turbo-16k
|
||||
temperature: 0.0
|
||||
timeout: PT60S
|
||||
|
||||
Reference in New Issue
Block a user