fix(knowledge): Fix the issue where knowledge cannot execute aggregated SQL (#794)

This commit is contained in:
liuyunchao-1998
2025-08-19 15:03:30 +08:00
committed by GitHub
parent f940edf585
commit 5e9740c047
8 changed files with 513 additions and 40 deletions

View File

@@ -24,6 +24,7 @@ import (
"github.com/coze-dev/coze-studio/backend/infra/contract/document"
)
//go:generate mockgen -destination ../../../internal/mock/infra/contract/nl2sql_mock/nl2sql_mock.go -package mock -source nl2sql.go Factory
type NL2SQL interface {
NL2SQL(ctx context.Context, messages []*schema.Message, tables []*document.TableSchema, opts ...Option) (sql string, err error)
}

View File

@@ -74,4 +74,7 @@ type SQLParser interface {
// AppendSQLFilter appends a filter condition to the SQL statement.
AppendSQLFilter(sql string, op SQLFilterOp, filter string) (string, error)
// AddSelectFieldsToSelectSQL add select fields to select sql
AddSelectFieldsToSelectSQL(origSQL string, cols []string) (string, error)
}