[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix mysql keyword conflict (#1245)
Browse files Browse the repository at this point in the history
  • Loading branch information
1402564807 committed Jun 27, 2024
1 parent 90f7a79 commit d1ec6ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public QueryResult execute(ChatExecuteContext chatExecuteContext) {
.status(ChatMemoryDO.Status.PENDING)
.question(chatExecuteContext.getQueryText())
.s2sql(chatExecuteContext.getParseInfo().getSqlInfo().getS2SQL())
.schema(buildSchemaStr(chatExecuteContext.getParseInfo()))
.dbSchema(buildSchemaStr(chatExecuteContext.getParseInfo()))
.build());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void review() {
.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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private void enableMemory(ChatMemoryDO memory) {
exemplarService.storeExemplar(memory.getAgentId().toString(),
SqlExemplar.builder()
.question(memory.getQuestion())
.dbSchema(memory.getSchema())
.dbSchema(memory.getDbSchema())
.sql(memory.getS2sql())
.build());
memory.setStatus(Status.ENABLED);
Expand Down

0 comments on commit d1ec6ba

Please sign in to comment.