fix(model): ModelMgr do not init

This commit is contained in:
fanlv 2025-07-25 13:43:09 +08:00
parent 2e2018af7a
commit e8686379b2
3 changed files with 6 additions and 2 deletions

View File

@ -27,6 +27,7 @@ import (
search "github.com/coze-dev/coze-studio/backend/domain/search/service"
user "github.com/coze-dev/coze-studio/backend/domain/user/service"
"github.com/coze-dev/coze-studio/backend/infra/contract/idgen"
"github.com/coze-dev/coze-studio/backend/infra/contract/modelmgr"
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
)
@ -37,6 +38,7 @@ type ServiceComponents struct {
CacheCli *redisV9.Client
ProjectEventBus search.ProjectEventBus
ModelMgr modelmgr.Manager
UserSVC user.User
ConnectorSVC connector.Connector
VariablesSVC variables.Variables
@ -62,6 +64,7 @@ func InitService(components *ServiceComponents) (*APPApplicationService, error)
APPApplicationSVC.oss = components.OSS
APPApplicationSVC.projectEventBus = components.ProjectEventBus
APPApplicationSVC.modelMgr = components.ModelMgr
APPApplicationSVC.userSVC = components.UserSVC
APPApplicationSVC.connectorSVC = components.ConnectorSVC

View File

@ -286,7 +286,6 @@ func (b *basicServices) toWorkflowServiceComponents(pluginSVC *plugin.PluginAppl
}
func (p *primaryServices) toSingleAgentServiceComponents() *singleagent.ServiceComponents {
return &singleagent.ServiceComponents{
IDGen: p.basicServices.infra.IDGenSVC,
DB: p.basicServices.infra.DB,
@ -336,6 +335,7 @@ func (p *primaryServices) toAPPServiceComponents() *app.ServiceComponents {
DB: infra.DB,
OSS: infra.TOSClient,
CacheCli: infra.CacheCli,
ModelMgr: infra.ModelMgr,
ProjectEventBus: basic.eventbus.projectEventBus,
UserSVC: basic.userSVC.DomainSVC,
ConnectorSVC: basic.connectorSVC.DomainSVC,

View File

@ -23,6 +23,8 @@ import (
"github.com/cloudwego/eino/compose"
"github.com/cloudwego/eino/schema"
"github.com/jinzhu/copier"
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossplugin"
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
@ -35,7 +37,6 @@ import (
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
"github.com/coze-dev/coze-studio/backend/types/errno"
"github.com/jinzhu/copier"
)
type singleAgentImpl struct {