package chatgpttemplate

import "github.com/tidbcloud/dataservices/idl/pbgen/proto/dataapi"

func FormatPromptForChat2Query20230129(prompt string, database string, metas []*dataapi.TableMeta) Prompt {
	template := `# MySQL SQL Generator
# Generate an SQL statement based on the following database schema:

` + FormatTableInstructionString(database, metas) + `

- Output only SQL.
- The generated SQL must be properly formatted and end with a semicolon (;).
- If no SQL can be generated, display the message "No SQL Generated".
- If the column name has spaces, enclose it in backticks (` + "`" + `).
- If the column name is a reserved word in MySQL, enclose it in backticks (` + "`" + `).

# Question:
# let's think step by step, generate only one sql to do query: "` + prompt + `"
---`
	return Prompt{
		Content: template,
		Version: "20230129",
	}
}
