Fix mysql keyword conflict (#1245)

This commit is contained in:
二毛
2024-06-27 15:02:19 +08:00
committed by GitHub
parent 90f7a79380
commit d1ec6badce
4 changed files with 4 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ public class SqlExecutor implements ChatExecutor {
.status(ChatMemoryDO.Status.PENDING)
.question(chatExecuteContext.getQueryText())
.s2sql(chatExecuteContext.getParseInfo().getSqlInfo().getS2SQL())
.schema(buildSchemaStr(chatExecuteContext.getParseInfo()))
.dbSchema(buildSchemaStr(chatExecuteContext.getParseInfo()))
.build());
}
}

View File

@@ -52,7 +52,7 @@ public class MemoryReviewTask {
.filter(c -> c.getStatus() == ChatMemoryDO.Status.PENDING)
.forEach(m -> {
Agent chatAgent = agentService.getAgent(m.getAgentId());
String promptStr = String.format(INSTRUCTION, m.getQuestion(), m.getSchema(), m.getS2sql());
String promptStr = String.format(INSTRUCTION, m.getQuestion(), m.getDbSchema(), m.getS2sql());
Prompt prompt = PromptTemplate.from(promptStr).apply(Collections.EMPTY_MAP);
keyPipelineLog.info("MemoryReviewTask reqPrompt:{}", promptStr);

View File

@@ -25,7 +25,7 @@ public class ChatMemoryDO {
private Integer agentId;
@TableField("db_schema")
private String schema;
private String dbSchema;
@TableField("s2_sql")
private String s2sql;

View File

@@ -47,7 +47,7 @@ public class MemoryServiceImpl implements MemoryService {
exemplarService.storeExemplar(memory.getAgentId().toString(),
SqlExemplar.builder()
.question(memory.getQuestion())
.dbSchema(memory.getSchema())
.dbSchema(memory.getDbSchema())
.sql(memory.getS2sql())
.build());
memory.setStatus(Status.ENABLED);