(improvement)(common) Fixed the compatibility issue with qwen. (#1193)

This commit is contained in:
lexluo09
2024-06-22 16:59:15 +08:00
committed by GitHub
parent 782d4ead9e
commit 32e2c1e39d
5 changed files with 53 additions and 34 deletions

View File

@@ -39,9 +39,9 @@ public class OnePassSCSqlGenStrategy extends SqlGenStrategy {
//3.perform multiple self-consistency inferences parallelly
Map<Prompt, String> prompt2Output = new ConcurrentHashMap<>();
prompt2Exemplar.keySet().parallelStream().forEach(prompt -> {
keyPipelineLog.info("OnePassSCSqlGenStrategy reqPrompt:\n{}", prompt.toSystemMessage());
keyPipelineLog.info("OnePassSCSqlGenStrategy reqPrompt:\n{}", prompt.toUserMessage());
ChatLanguageModel chatLanguageModel = getChatLanguageModel(llmReq.getLlmConfig());
Response<AiMessage> response = chatLanguageModel.generate(prompt.toSystemMessage());
Response<AiMessage> response = chatLanguageModel.generate(prompt.toUserMessage());
String result = response.content().text();
prompt2Output.put(prompt, result);
keyPipelineLog.info("OnePassSCSqlGenStrategy modelResp:\n{}", result);