[feature][headless-chat]Introduce ChatApp to support more flexible chat model config.#1739

This commit is contained in:
jerryjzhang
2024-10-12 15:05:47 +08:00
parent fc94a6718b
commit 7c76c69ac0
9 changed files with 25 additions and 21 deletions

View File

@@ -39,8 +39,8 @@ public class LLMSqlCorrector extends BaseSemanticCorrector {
+ "\n#Question:{{question}} #InputSQL:{{sql}} #Response:";
public LLMSqlCorrector() {
ChatAppManager.register(ChatApp.builder().key(APP_KEY).prompt(INSTRUCTION).name("语义SQL修正")
.description("").enable(false).build());
ChatAppManager.register(APP_KEY, ChatApp.builder().prompt(INSTRUCTION).name("语义SQL修正")
.description("通过大模型对解析S2SQL做二次修正").enable(false).build());
}
@Data

View File

@@ -43,7 +43,7 @@ public class OnePassSCSqlGenStrategy extends SqlGenStrategy {
+ "\n#Question: Question:{{question}},Schema:{{schema}},SideInfo:{{information}}";
public OnePassSCSqlGenStrategy() {
ChatAppManager.register(ChatApp.builder().key(APP_KEY).prompt(INSTRUCTION).name("语义SQL解析")
ChatAppManager.register(APP_KEY, ChatApp.builder().prompt(INSTRUCTION).name("语义SQL解析")
.description("通过大模型做语义解析生成S2SQL").enable(true).build());
}