(improvement)(Headless) Fix python llm proxy sqlWeight npe (#902) (#903)

* (improvement)(Headless) fix python llm proxy sqlWeight npe

---------

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-04-10 17:48:06 +08:00
committed by GitHub
parent d754bd50b0
commit f2b9b61be6
3 changed files with 54 additions and 71 deletions

View File

@@ -113,6 +113,9 @@ public class OutputFormat {
public static Map<String, LLMSqlResp> buildSqlRespMap(List<Map<String, String>> sqlExamples,
Map<String, Double> sqlMap) {
if (sqlMap == null) {
return new HashMap<>();
}
return sqlMap.entrySet().stream()
.collect(Collectors.toMap(
Map.Entry::getKey,