fix: replace workflow hardcoding chat model for knowledge recall (#233)

This commit is contained in:
N3ko
2025-07-30 14:27:01 +08:00
committed by GitHub
parent 5013a9ed53
commit b9d03b148c
12 changed files with 218 additions and 123 deletions

View File

@@ -39,6 +39,7 @@ import (
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/canvas/adaptor"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/compose"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/repo"
"github.com/coze-dev/coze-studio/backend/infra/contract/chatmodel"
"github.com/coze-dev/coze-studio/backend/infra/contract/idgen"
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
@@ -67,8 +68,8 @@ func NewWorkflowService(repo workflow.Repository) workflow.Service {
}
func NewWorkflowRepository(idgen idgen.IDGenerator, db *gorm.DB, redis *redis.Client, tos storage.Storage,
cpStore einoCompose.CheckPointStore) workflow.Repository {
return repo.NewRepository(idgen, db, redis, tos, cpStore)
cpStore einoCompose.CheckPointStore, chatModel chatmodel.BaseChatModel) workflow.Repository {
return repo.NewRepository(idgen, db, redis, tos, cpStore, chatModel)
}
func (i *impl) ListNodeMeta(ctx context.Context, nodeTypes map[entity.NodeType]bool) (map[string][]*entity.NodeTypeMeta, []entity.Category, error) {