fix(model): ModelMgr do not init
This commit is contained in:
parent
2e2018af7a
commit
e8686379b2
|
|
@ -27,6 +27,7 @@ import (
|
||||||
search "github.com/coze-dev/coze-studio/backend/domain/search/service"
|
search "github.com/coze-dev/coze-studio/backend/domain/search/service"
|
||||||
user "github.com/coze-dev/coze-studio/backend/domain/user/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/idgen"
|
||||||
|
"github.com/coze-dev/coze-studio/backend/infra/contract/modelmgr"
|
||||||
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
|
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -37,6 +38,7 @@ type ServiceComponents struct {
|
||||||
CacheCli *redisV9.Client
|
CacheCli *redisV9.Client
|
||||||
ProjectEventBus search.ProjectEventBus
|
ProjectEventBus search.ProjectEventBus
|
||||||
|
|
||||||
|
ModelMgr modelmgr.Manager
|
||||||
UserSVC user.User
|
UserSVC user.User
|
||||||
ConnectorSVC connector.Connector
|
ConnectorSVC connector.Connector
|
||||||
VariablesSVC variables.Variables
|
VariablesSVC variables.Variables
|
||||||
|
|
@ -62,6 +64,7 @@ func InitService(components *ServiceComponents) (*APPApplicationService, error)
|
||||||
|
|
||||||
APPApplicationSVC.oss = components.OSS
|
APPApplicationSVC.oss = components.OSS
|
||||||
APPApplicationSVC.projectEventBus = components.ProjectEventBus
|
APPApplicationSVC.projectEventBus = components.ProjectEventBus
|
||||||
|
APPApplicationSVC.modelMgr = components.ModelMgr
|
||||||
|
|
||||||
APPApplicationSVC.userSVC = components.UserSVC
|
APPApplicationSVC.userSVC = components.UserSVC
|
||||||
APPApplicationSVC.connectorSVC = components.ConnectorSVC
|
APPApplicationSVC.connectorSVC = components.ConnectorSVC
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,6 @@ func (b *basicServices) toWorkflowServiceComponents(pluginSVC *plugin.PluginAppl
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *primaryServices) toSingleAgentServiceComponents() *singleagent.ServiceComponents {
|
func (p *primaryServices) toSingleAgentServiceComponents() *singleagent.ServiceComponents {
|
||||||
|
|
||||||
return &singleagent.ServiceComponents{
|
return &singleagent.ServiceComponents{
|
||||||
IDGen: p.basicServices.infra.IDGenSVC,
|
IDGen: p.basicServices.infra.IDGenSVC,
|
||||||
DB: p.basicServices.infra.DB,
|
DB: p.basicServices.infra.DB,
|
||||||
|
|
@ -336,6 +335,7 @@ func (p *primaryServices) toAPPServiceComponents() *app.ServiceComponents {
|
||||||
DB: infra.DB,
|
DB: infra.DB,
|
||||||
OSS: infra.TOSClient,
|
OSS: infra.TOSClient,
|
||||||
CacheCli: infra.CacheCli,
|
CacheCli: infra.CacheCli,
|
||||||
|
ModelMgr: infra.ModelMgr,
|
||||||
ProjectEventBus: basic.eventbus.projectEventBus,
|
ProjectEventBus: basic.eventbus.projectEventBus,
|
||||||
UserSVC: basic.userSVC.DomainSVC,
|
UserSVC: basic.userSVC.DomainSVC,
|
||||||
ConnectorSVC: basic.connectorSVC.DomainSVC,
|
ConnectorSVC: basic.connectorSVC.DomainSVC,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ import (
|
||||||
|
|
||||||
"github.com/cloudwego/eino/compose"
|
"github.com/cloudwego/eino/compose"
|
||||||
"github.com/cloudwego/eino/schema"
|
"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/api/model/ocean/cloud/bot_common"
|
||||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossplugin"
|
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossplugin"
|
||||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
"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/lang/slices"
|
||||||
"github.com/coze-dev/coze-studio/backend/pkg/logs"
|
"github.com/coze-dev/coze-studio/backend/pkg/logs"
|
||||||
"github.com/coze-dev/coze-studio/backend/types/errno"
|
"github.com/coze-dev/coze-studio/backend/types/errno"
|
||||||
"github.com/jinzhu/copier"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type singleAgentImpl struct {
|
type singleAgentImpl struct {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue