Skip to content

Commit e6b7efe

Browse files
committed
选择最优sql时,也不能返回多余信息
1 parent 49f809b commit e6b7efe

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

eino/message.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ func ddl2sqlMessages(ddl, question string) ([]*schema.Message, error) {
7272
func choiceSqlMessages(sqls, ddl, question string) ([]*schema.Message, error) {
7373
template := createTemplate()
7474
data := map[string]any{
75-
"role": role,
76-
"question": "Select the most suitable SQL output from the above SQL statements",
77-
"ddl": ddl,
78-
"limit": limit,
75+
"role": role,
76+
"question": "Select the most suitable SQL output from the above SQL statements." +
77+
"The returned content can only contain SQL statements, without explanations or other information, and should not be labeled with SQL tags.",
78+
"ddl": ddl,
79+
"limit": limit,
7980
"chat_history": []*schema.Message{
8081
schema.UserMessage(question),
8182
schema.AssistantMessage(sqls, nil),

0 commit comments

Comments
 (0)