mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
Fix mysql keyword conflict (#1245)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user