message update

This commit is contained in:
robin
2023-07-22 12:52:25 +08:00
parent aaab1d7382
commit ad6cf6667f

View File

@ -505,11 +505,10 @@ public class ChatController {
: queryRequest.getPromptType();
PromptType pType = EasyEnumUtils.getEnum(PromptType.class, promptType);
String ext = StringUtils.isNotBlank(queryRequest.getExt()) ? queryRequest.getExt() : "";
String result = "假设你是个SQL编辑器接下来你返回的SQL代码要和其他内容分隔非SQL代码内容的每一行前面追加-- \n";
String schemaProperty = CollectionUtils.isNotEmpty(tableSchemas) ? String.format(
"%s### 请根据以下table properties和SQL input%s. %s\n#\n### %s SQL tables, with their properties:\n#\n# "
+ "%s\n#\n#\n### SQL input: %s", result, pType.getDescription(), ext, dataSourceType,
properties, prompt) : String.format("%s### 请根据以下SQL input%s. %s\n#\n### SQL input: %s", result,
"### 请根据以下table properties和SQL input%s. %s\n#\n### %s SQL tables, with their properties:\n#\n# "
+ "%s\n#\n#\n### SQL input: %s", pType.getDescription(), ext, dataSourceType,
properties, prompt) : String.format("### 请根据以下SQL input%s. %s\n#\n### SQL input: %s",
pType.getDescription(), ext, prompt);
switch (pType) {
case SQL_2_SQL:
@ -519,9 +518,6 @@ public class ChatController {
default:
break;
}
//if (I18nUtils.isEn()) {
// schemaProperty = String.format("%s\n#\n### 返回结果要求为英文", schemaProperty);
//}
return schemaProperty;
}
}