refactor: restructure crossdomain package layout (#2377)
This commit is contained in:
@ -47,10 +47,6 @@ import (
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
modelknowledge "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
@ -61,22 +57,26 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/application/user"
|
||||
appworkflow "github.com/coze-dev/coze-studio/backend/application/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/bizpkg/llm/modelbuilder"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun/agentrunmock"
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation/conversationmock"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge/knowledgemock"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
message0 "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/message/messagemock"
|
||||
crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin"
|
||||
pluginmodel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/pluginmock"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user"
|
||||
pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/plugin"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/agentrunmock"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
message0 "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/conversation/conversationmock"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/database/databasemock"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/knowledgemock"
|
||||
knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/message/messagemock"
|
||||
crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin"
|
||||
pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/impl"
|
||||
pluginmodel "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/pluginmock"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user"
|
||||
agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity"
|
||||
conventity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
msgentity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity"
|
||||
@ -2771,7 +2771,7 @@ func TestCopyWorkflowAppToLibrary(t *testing.T) {
|
||||
r.load("copy_to_app/child_1.json", withID(7515027150387281920), withProjectID(appIDInt64))
|
||||
r.load("copy_to_app/main.json", withID(7515027091302121472), withProjectID(appIDInt64))
|
||||
|
||||
defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&modelknowledge.CopyKnowledgeResponse{
|
||||
defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&knowledge.CopyKnowledgeResponse{
|
||||
TargetKnowledgeID: 100100,
|
||||
}, nil).Build().UnPatch()
|
||||
|
||||
@ -2874,7 +2874,7 @@ func TestCopyWorkflowAppToLibrary(t *testing.T) {
|
||||
|
||||
defer mockey.Mock(appworkflow.PublishWorkflowResource).To(mockPublishWorkflowResource).Build().UnPatch()
|
||||
|
||||
defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&modelknowledge.CopyKnowledgeResponse{
|
||||
defer mockey.Mock((*appknowledge.KnowledgeApplicationService).CopyKnowledge).Return(&knowledge.CopyKnowledgeResponse{
|
||||
TargetKnowledgeID: 100100,
|
||||
}, nil).Build().UnPatch()
|
||||
|
||||
|
||||
@ -32,8 +32,6 @@ import (
|
||||
projectAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/project"
|
||||
publishAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/publish"
|
||||
taskAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/task"
|
||||
connectorModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
@ -46,7 +44,9 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/application/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/application/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/bizpkg/config"
|
||||
pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
connectorModel "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/app/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/app/repository"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/app/service"
|
||||
|
||||
@ -37,34 +37,34 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/application/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/application/user"
|
||||
"github.com/coze-dev/coze-studio/backend/application/workflow"
|
||||
crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun"
|
||||
crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/contract/connector"
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
|
||||
crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/contract/datacopy"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin"
|
||||
crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/contract/search"
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user"
|
||||
crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
|
||||
agentrunImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/agentrun"
|
||||
connectorImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/connector"
|
||||
conversationImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/conversation"
|
||||
crossuserImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/crossuser"
|
||||
databaseImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/database"
|
||||
dataCopyImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/datacopy"
|
||||
knowledgeImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/knowledge"
|
||||
messageImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/message"
|
||||
pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/plugin"
|
||||
searchImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/search"
|
||||
singleagentImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/singleagent"
|
||||
uploadImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/upload"
|
||||
variablesImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/variables"
|
||||
workflowImpl "github.com/coze-dev/coze-studio/backend/crossdomain/impl/workflow"
|
||||
crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent"
|
||||
singleagentImpl "github.com/coze-dev/coze-studio/backend/crossdomain/agent/impl"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun"
|
||||
agentrunImpl "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/impl"
|
||||
crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/connector"
|
||||
connectorImpl "github.com/coze-dev/coze-studio/backend/crossdomain/connector/impl"
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation"
|
||||
conversationImpl "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/impl"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database"
|
||||
databaseImpl "github.com/coze-dev/coze-studio/backend/crossdomain/database/impl"
|
||||
crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/datacopy"
|
||||
dataCopyImpl "github.com/coze-dev/coze-studio/backend/crossdomain/datacopy/impl"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge"
|
||||
knowledgeImpl "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/impl"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
messageImpl "github.com/coze-dev/coze-studio/backend/crossdomain/message/impl"
|
||||
crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin"
|
||||
pluginImpl "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/impl"
|
||||
crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/search"
|
||||
searchImpl "github.com/coze-dev/coze-studio/backend/crossdomain/search/impl"
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload"
|
||||
uploadImpl "github.com/coze-dev/coze-studio/backend/crossdomain/upload/impl"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user"
|
||||
crossuserImpl "github.com/coze-dev/coze-studio/backend/crossdomain/user/impl"
|
||||
crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables"
|
||||
variablesImpl "github.com/coze-dev/coze-studio/backend/crossdomain/variables/impl"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow"
|
||||
workflowImpl "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/impl"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/checkpoint"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/document/progressbar"
|
||||
progressBarImpl "github.com/coze-dev/coze-studio/backend/infra/document/progressbar/impl/progressbar"
|
||||
|
||||
@ -28,9 +28,9 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/message"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/run"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
crossDomainMessage "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model"
|
||||
crossDomainMessage "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
saEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity"
|
||||
convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
|
||||
@ -24,8 +24,8 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/message"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/run"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
singleAgentEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity"
|
||||
|
||||
@ -29,10 +29,10 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/run"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model"
|
||||
message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
saEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity"
|
||||
convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/run"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
saEntity "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
openapiEntity "github.com/coze-dev/coze-studio/backend/domain/openauth/openapiauth/entity"
|
||||
|
||||
@ -23,8 +23,8 @@ import (
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/message"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/run"
|
||||
apiMessage "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
message3 "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
convEntity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity"
|
||||
@ -67,9 +67,9 @@ func (m *OpenapiMessageApplication) GetApiMessageList(ctx context.Context, mr *m
|
||||
AgentID: currentConversation.AgentID,
|
||||
Limit: int(ptr.From(mr.Limit)),
|
||||
|
||||
MessageType: []*message3.MessageType{
|
||||
ptr.Of(message3.MessageTypeQuestion),
|
||||
ptr.Of(message3.MessageTypeAnswer),
|
||||
MessageType: []*model.MessageType{
|
||||
ptr.Of(model.MessageTypeQuestion),
|
||||
ptr.Of(model.MessageTypeAnswer),
|
||||
},
|
||||
}
|
||||
if mr.ChatID != nil {
|
||||
@ -127,7 +127,7 @@ func (m *OpenapiMessageApplication) buildMessageListResponse(ctx context.Context
|
||||
MetaData: dm.Ext,
|
||||
ReasoningContent: ptr.Of(dm.ReasoningContent),
|
||||
}
|
||||
if dm.ContentType == message3.ContentTypeMix {
|
||||
if dm.ContentType == model.ContentTypeMix {
|
||||
msg.ContentType = run.ContentTypeMixApi
|
||||
if dm.DisplayContent != "" {
|
||||
msg.Content = m.parseDisplayContent(ctx, dm)
|
||||
@ -158,10 +158,10 @@ func (m *OpenapiMessageApplication) parseDisplayContent(ctx context.Context, dm
|
||||
if one == nil {
|
||||
continue
|
||||
}
|
||||
switch apiMessage.InputType(one.Type) {
|
||||
case apiMessage.InputTypeText:
|
||||
switch model.InputType(one.Type) {
|
||||
case model.InputTypeText:
|
||||
continue
|
||||
case apiMessage.InputTypeImage, apiMessage.InputTypeFile:
|
||||
case model.InputTypeImage, model.InputTypeFile:
|
||||
if one.GetFileID() != 0 {
|
||||
fileInfo, err := m.UploaodDomainSVC.GetFile(ctx, &uploadService.GetFileRequest{
|
||||
ID: one.GetFileID(),
|
||||
|
||||
@ -25,11 +25,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
modelCommon "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/document"
|
||||
@ -145,17 +143,17 @@ func convertDocTableSheet2Model(sheet entity.TableSheet) *dataset.DocTableSheet
|
||||
}
|
||||
}
|
||||
|
||||
func convertTableMeta(t []*entity.TableColumn) []*modelCommon.DocTableColumn {
|
||||
func convertTableMeta(t []*entity.TableColumn) []*dataset.DocTableColumn {
|
||||
if len(t) == 0 {
|
||||
return nil
|
||||
}
|
||||
resp := make([]*modelCommon.DocTableColumn, 0)
|
||||
resp := make([]*dataset.DocTableColumn, 0)
|
||||
for i := range t {
|
||||
if t[i] == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
resp = append(resp, &modelCommon.DocTableColumn{
|
||||
resp = append(resp, &dataset.DocTableColumn{
|
||||
ID: t[i].ID,
|
||||
ColumnName: t[i].Name,
|
||||
IsSemantic: t[i].Indexing,
|
||||
@ -167,30 +165,30 @@ func convertTableMeta(t []*entity.TableColumn) []*modelCommon.DocTableColumn {
|
||||
return resp
|
||||
}
|
||||
|
||||
func convertColumnType(t document.TableColumnType) *modelCommon.ColumnType {
|
||||
func convertColumnType(t document.TableColumnType) *dataset.ColumnType {
|
||||
switch t {
|
||||
case document.TableColumnTypeString:
|
||||
return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Text)
|
||||
return dataset.ColumnTypePtr(dataset.ColumnType_Text)
|
||||
case document.TableColumnTypeBoolean:
|
||||
return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Boolean)
|
||||
return dataset.ColumnTypePtr(dataset.ColumnType_Boolean)
|
||||
case document.TableColumnTypeNumber:
|
||||
return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Float)
|
||||
return dataset.ColumnTypePtr(dataset.ColumnType_Float)
|
||||
case document.TableColumnTypeTime:
|
||||
return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Date)
|
||||
return dataset.ColumnTypePtr(dataset.ColumnType_Date)
|
||||
case document.TableColumnTypeInteger:
|
||||
return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Number)
|
||||
return dataset.ColumnTypePtr(dataset.ColumnType_Number)
|
||||
case document.TableColumnTypeImage:
|
||||
return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Image)
|
||||
return dataset.ColumnTypePtr(dataset.ColumnType_Image)
|
||||
default:
|
||||
return modelCommon.ColumnTypePtr(modelCommon.ColumnType_Text)
|
||||
return dataset.ColumnTypePtr(dataset.ColumnType_Text)
|
||||
}
|
||||
}
|
||||
|
||||
func convertDocTableSheet(t *entity.TableSheet) *modelCommon.DocTableSheet {
|
||||
func convertDocTableSheet(t *entity.TableSheet) *dataset.DocTableSheet {
|
||||
if t == nil {
|
||||
return nil
|
||||
}
|
||||
return &modelCommon.DocTableSheet{
|
||||
return &dataset.DocTableSheet{
|
||||
ID: t.SheetId,
|
||||
SheetName: t.SheetName,
|
||||
TotalRow: t.TotalRows,
|
||||
@ -217,7 +215,7 @@ func convertSliceContent(s *entity.Slice) string {
|
||||
if len(s.RawContent) == 0 {
|
||||
return ""
|
||||
}
|
||||
if s.RawContent[0].Type == knowledgeModel.SliceContentTypeTable {
|
||||
if s.RawContent[0].Type == model.SliceContentTypeTable {
|
||||
tableData := make([]sliceContentData, 0, len(s.RawContent[0].Table.Columns))
|
||||
for _, col := range s.RawContent[0].Table.Columns {
|
||||
tableData = append(tableData, sliceContentData{
|
||||
@ -240,13 +238,13 @@ type sliceContentData struct {
|
||||
Desc string `json:"desc"`
|
||||
}
|
||||
|
||||
func convertSliceStatus2Model(status knowledgeModel.SliceStatus) dataset.SliceStatus {
|
||||
func convertSliceStatus2Model(status model.SliceStatus) dataset.SliceStatus {
|
||||
switch status {
|
||||
case knowledgeModel.SliceStatusInit:
|
||||
case model.SliceStatusInit:
|
||||
return dataset.SliceStatus_PendingVectoring
|
||||
case knowledgeModel.SliceStatusFinishStore:
|
||||
case model.SliceStatusFinishStore:
|
||||
return dataset.SliceStatus_FinishVectoring
|
||||
case knowledgeModel.SliceStatusFailed:
|
||||
case model.SliceStatusFailed:
|
||||
return dataset.SliceStatus_Deactive
|
||||
default:
|
||||
return dataset.SliceStatus_PendingVectoring
|
||||
|
||||
@ -26,13 +26,13 @@ import (
|
||||
|
||||
"github.com/bytedance/sonic"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
document "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
modelCommon "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
resource "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/search"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
resourceEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
|
||||
@ -22,8 +22,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/database/entity"
|
||||
database "github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
|
||||
@ -21,14 +21,14 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
document "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/search"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/database/entity"
|
||||
databaseEntity "github.com/coze-dev/coze-studio/backend/domain/memory/database/entity"
|
||||
database "github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
|
||||
@ -23,10 +23,10 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity"
|
||||
variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
||||
@ -32,10 +32,10 @@ import (
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert/api"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert/api"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/repository"
|
||||
|
||||
@ -30,9 +30,9 @@ import (
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/repository"
|
||||
|
||||
@ -23,7 +23,7 @@ import (
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
||||
@ -30,8 +30,8 @@ import (
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert/api"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert/api"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/repository"
|
||||
|
||||
@ -26,8 +26,8 @@ import (
|
||||
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
pluginCommon "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
mockPlugin "github.com/coze-dev/coze-studio/backend/internal/mock/domain/plugin"
|
||||
|
||||
@ -30,9 +30,9 @@ import (
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
||||
@ -24,11 +24,11 @@ import (
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
search2 "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/marketplace_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
search2 "github.com/coze-dev/coze-studio/backend/crossdomain/search/model"
|
||||
searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
|
||||
@ -20,10 +20,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
dbservice "github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
|
||||
|
||||
@ -23,10 +23,10 @@ import (
|
||||
"strconv"
|
||||
"sync"
|
||||
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/resource"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
search "github.com/coze-dev/coze-studio/backend/domain/search/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
||||
@ -23,9 +23,9 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/bizpkg/config"
|
||||
singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
||||
@ -23,15 +23,15 @@ import (
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/bizpkg/config"
|
||||
"github.com/coze-dev/coze-studio/backend/bizpkg/config/modelmgr"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
knowledge "github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
pluginEntity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
|
||||
@ -25,9 +25,9 @@ import (
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
search "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
||||
@ -29,13 +29,13 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_open_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
|
||||
pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/agent"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database"
|
||||
database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
singleagent "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/service"
|
||||
variableEntity "github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity"
|
||||
|
||||
@ -29,14 +29,14 @@ import (
|
||||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun"
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun"
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/upload/service"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity"
|
||||
|
||||
@ -26,12 +26,12 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/mock/gomock"
|
||||
|
||||
messageentity "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun/agentrunmock"
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload/uploadmock"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/agentrunmock"
|
||||
messageentity "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/upload/uploadmock"
|
||||
agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity"
|
||||
uploadentity "github.com/coze-dev/coze-studio/backend/domain/upload/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/upload/service"
|
||||
|
||||
@ -31,8 +31,6 @@ import (
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
@ -44,9 +42,11 @@ import (
|
||||
appmemory "github.com/coze-dev/coze-studio/backend/application/memory"
|
||||
appplugin "github.com/coze-dev/coze-studio/backend/application/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/application/user"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge"
|
||||
pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
pluginConsts "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/dto"
|
||||
search "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
domainWorkflow "github.com/coze-dev/coze-studio/backend/domain/workflow"
|
||||
|
||||
@ -21,16 +21,18 @@ import (
|
||||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
|
||||
agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
)
|
||||
|
||||
// Requests and responses must not reference domain entities and can only use models under api/model/crossdomain.
|
||||
type SingleAgent interface {
|
||||
StreamExecute(ctx context.Context,
|
||||
agentRuntime *AgentRuntime) (*schema.StreamReader[*singleagent.AgentEvent], error)
|
||||
ObtainAgentByIdentity(ctx context.Context, identity *singleagent.AgentIdentity) (*singleagent.SingleAgent, error)
|
||||
agentRuntime *AgentRuntime) (*schema.StreamReader[*model.AgentEvent], error)
|
||||
ObtainAgentByIdentity(ctx context.Context, identity *model.AgentIdentity) (*model.SingleAgent, error)
|
||||
}
|
||||
|
||||
type AgentRuntime struct {
|
||||
@ -49,9 +51,9 @@ type AgentRuntime struct {
|
||||
ResumeInfo *ResumeInfo
|
||||
}
|
||||
|
||||
type ResumeInfo = singleagent.InterruptInfo
|
||||
type ResumeInfo = model.InterruptInfo
|
||||
|
||||
type AgentEvent = singleagent.AgentEvent
|
||||
type AgentEvent = model.AgentEvent
|
||||
|
||||
var defaultSVC SingleAgent
|
||||
|
||||
@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package agent
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agent"
|
||||
crossagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model"
|
||||
singleagent "github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
|
||||
@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package singleagent
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/cloudwego/eino/schema"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
|
||||
agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow"
|
||||
)
|
||||
|
||||
type EventType string
|
||||
@ -113,7 +113,7 @@ type ExecuteRequest struct {
|
||||
ResumeInfo *InterruptInfo
|
||||
PreCallTools []*agentrun.ToolsRetriever
|
||||
|
||||
CustomVariables map[string]string
|
||||
CustomVariables map[string]string
|
||||
|
||||
ConversationID int64
|
||||
}
|
||||
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package agentrun
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity"
|
||||
agentrun "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/service"
|
||||
)
|
||||
@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package agentrun
|
||||
package model
|
||||
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
|
||||
type Tool struct {
|
||||
PluginID int64 `json:"plugin_id"`
|
||||
ToolID int64 `json:"tool_id"`
|
||||
Arguments string `json:"arguments"`
|
||||
ToolName string `json:"tool_name"`
|
||||
Type ToolType `json:"type"`
|
||||
PluginID int64 `json:"plugin_id"`
|
||||
ToolID int64 `json:"tool_id"`
|
||||
Arguments string `json:"arguments"`
|
||||
ToolName string `json:"tool_name"`
|
||||
Type ToolType `json:"type"`
|
||||
PluginFrom *bot_common.PluginFrom `json:"plugin_from"`
|
||||
}
|
||||
|
||||
@ -35,11 +35,11 @@ const (
|
||||
)
|
||||
|
||||
type ToolsRetriever struct {
|
||||
PluginID int64
|
||||
ToolName string
|
||||
ToolID int64
|
||||
Arguments string
|
||||
Type ToolType
|
||||
PluginID int64
|
||||
ToolName string
|
||||
ToolID int64
|
||||
Arguments string
|
||||
Type ToolType
|
||||
PluginFrom *bot_common.PluginFrom `json:"plugin_from"`
|
||||
}
|
||||
|
||||
@ -19,13 +19,13 @@ package connector
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model"
|
||||
)
|
||||
|
||||
type Connector interface {
|
||||
List(ctx context.Context) ([]*connector.Connector, error)
|
||||
GetByIDs(ctx context.Context, ids []int64) (map[int64]*connector.Connector, error)
|
||||
GetByID(ctx context.Context, id int64) (*connector.Connector, error)
|
||||
List(ctx context.Context) ([]*model.Connector, error)
|
||||
GetByIDs(ctx context.Context, ids []int64) (map[int64]*model.Connector, error)
|
||||
GetByID(ctx context.Context, id int64) (*model.Connector, error)
|
||||
}
|
||||
|
||||
var defaultSVC Connector
|
||||
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package connector
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector"
|
||||
crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/contract/connector"
|
||||
crossconnector "github.com/coze-dev/coze-studio/backend/crossdomain/connector"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/connector/model"
|
||||
connector "github.com/coze-dev/coze-studio/backend/domain/connector/service"
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package connector
|
||||
package model
|
||||
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package knowledge
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
)
|
||||
|
||||
//go:generate mockgen -destination knowledgemock/knowledge_mock.go --package knowledgemock -source knowledge.go
|
||||
type Knowledge interface {
|
||||
ListKnowledge(ctx context.Context, request *knowledge.ListKnowledgeRequest) (response *knowledge.ListKnowledgeResponse, err error)
|
||||
GetKnowledgeByID(ctx context.Context, request *knowledge.GetKnowledgeByIDRequest) (response *knowledge.GetKnowledgeByIDResponse, err error)
|
||||
Retrieve(ctx context.Context, req *knowledge.RetrieveRequest) (*knowledge.RetrieveResponse, error)
|
||||
DeleteKnowledge(ctx context.Context, request *knowledge.DeleteKnowledgeRequest) error
|
||||
MGetKnowledgeByID(ctx context.Context, request *knowledge.MGetKnowledgeByIDRequest) (response *knowledge.MGetKnowledgeByIDResponse, err error)
|
||||
Store(ctx context.Context, document *knowledge.CreateDocumentRequest) (*knowledge.CreateDocumentResponse, error)
|
||||
Delete(ctx context.Context, r *knowledge.DeleteDocumentRequest) (*knowledge.DeleteDocumentResponse, error)
|
||||
ListKnowledgeDetail(ctx context.Context, req *knowledge.ListKnowledgeDetailRequest) (*knowledge.ListKnowledgeDetailResponse, error)
|
||||
}
|
||||
|
||||
var defaultSVC Knowledge
|
||||
|
||||
func DefaultSVC() Knowledge {
|
||||
return defaultSVC
|
||||
}
|
||||
|
||||
func SetDefaultSVC(c Knowledge) {
|
||||
defaultSVC = c
|
||||
}
|
||||
@ -19,13 +19,13 @@ package conversation
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
)
|
||||
|
||||
//go:generate mockgen -destination conversationmock/conversation_mock.go --package conversationmock -source conversation.go
|
||||
type Conversation interface {
|
||||
GetCurrentConversation(ctx context.Context, req *conversation.GetCurrent) (*conversation.Conversation, error)
|
||||
GetCurrentConversation(ctx context.Context, req *model.GetCurrent) (*model.Conversation, error)
|
||||
CreateConversation(ctx context.Context, req *entity.CreateMeta) (*entity.Conversation, error)
|
||||
ClearConversationHistory(ctx context.Context, req *ClearConversationHistoryReq) (*entity.NewConversationCtxResponse, error)
|
||||
GetByID(ctx context.Context, id int64) (*entity.Conversation, error)
|
||||
@ -29,8 +29,8 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
conversation "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation"
|
||||
conversation0 "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation"
|
||||
conversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model"
|
||||
conversation0 "github.com/coze-dev/coze-studio/backend/crossdomain/conversation"
|
||||
entity "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package conversation
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/conversation"
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/contract/conversation"
|
||||
crossconversation "github.com/coze-dev/coze-studio/backend/crossdomain/conversation"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/conversation/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/entity"
|
||||
conversation "github.com/coze-dev/coze-studio/backend/domain/conversation/conversation/service"
|
||||
)
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package conversation
|
||||
package model
|
||||
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/conversation/common"
|
||||
|
||||
@ -19,10 +19,10 @@ package database
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
)
|
||||
|
||||
//go:generate mockgen -destination databasemock/database_mock.go --package databasemock -source database.go
|
||||
//go:generate mockgen -destination databasemock/database_mock.go --package databasemock -source model.go
|
||||
type Database interface {
|
||||
ExecuteSQL(ctx context.Context, req *database.ExecuteSQLRequest) (*database.ExecuteSQLResponse, error)
|
||||
PublishDatabase(ctx context.Context, req *database.PublishDatabaseRequest) (resp *database.PublishDatabaseResponse, err error)
|
||||
@ -13,7 +13,7 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
database "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package database
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -23,10 +23,10 @@ import (
|
||||
|
||||
"github.com/spf13/cast"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
database "github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package database
|
||||
package model
|
||||
|
||||
type OperateType int64
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package database
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package datacopy
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -22,7 +22,7 @@ import (
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/appinfra"
|
||||
crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/contract/datacopy"
|
||||
crossdatacopy "github.com/coze-dev/coze-studio/backend/crossdomain/datacopy"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/datacopy"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/datacopy/service"
|
||||
)
|
||||
0
backend/crossdomain/datacopy/model/.gitkeep
Normal file
0
backend/crossdomain/datacopy/model/.gitkeep
Normal file
45
backend/crossdomain/knowledge/contract.go
Normal file
45
backend/crossdomain/knowledge/contract.go
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package knowledge
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
)
|
||||
|
||||
//go:generate mockgen -destination knowledgemock/knowledge_mock.go --package knowledgemock -source model.go
|
||||
type Knowledge interface {
|
||||
ListKnowledge(ctx context.Context, request *model.ListKnowledgeRequest) (response *model.ListKnowledgeResponse, err error)
|
||||
GetKnowledgeByID(ctx context.Context, request *model.GetKnowledgeByIDRequest) (response *model.GetKnowledgeByIDResponse, err error)
|
||||
Retrieve(ctx context.Context, req *model.RetrieveRequest) (*model.RetrieveResponse, error)
|
||||
DeleteKnowledge(ctx context.Context, request *model.DeleteKnowledgeRequest) error
|
||||
MGetKnowledgeByID(ctx context.Context, request *model.MGetKnowledgeByIDRequest) (response *model.MGetKnowledgeByIDResponse, err error)
|
||||
Store(ctx context.Context, document *model.CreateDocumentRequest) (*model.CreateDocumentResponse, error)
|
||||
Delete(ctx context.Context, r *model.DeleteDocumentRequest) (*model.DeleteDocumentResponse, error)
|
||||
ListKnowledgeDetail(ctx context.Context, req *model.ListKnowledgeDetailRequest) (*model.ListKnowledgeDetailResponse, error)
|
||||
}
|
||||
|
||||
var defaultSVC Knowledge
|
||||
|
||||
func DefaultSVC() Knowledge {
|
||||
return defaultSVC
|
||||
}
|
||||
|
||||
func SetDefaultSVC(c Knowledge) {
|
||||
defaultSVC = c
|
||||
}
|
||||
@ -14,17 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package knowledge
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/document/parser"
|
||||
@ -99,11 +98,11 @@ func (i *impl) Store(ctx context.Context, document *model.CreateDocumentRequest)
|
||||
cs.Overlap = document.ChunkingStrategy.Overlap
|
||||
|
||||
req := &entity.Document{
|
||||
Info: knowledge.Info{
|
||||
Info: model.Info{
|
||||
Name: document.FileName,
|
||||
},
|
||||
KnowledgeID: document.KnowledgeID,
|
||||
Type: knowledge.DocumentTypeText,
|
||||
Type: model.DocumentTypeText,
|
||||
URL: document.FileURL,
|
||||
Source: entity.DocumentSourceLocal,
|
||||
ParsingStrategy: ps,
|
||||
@ -168,7 +167,7 @@ func (i *impl) ListKnowledgeDetail(ctx context.Context, req *model.ListKnowledge
|
||||
}
|
||||
|
||||
resp := &model.ListKnowledgeDetailResponse{
|
||||
KnowledgeDetails: slices.Transform(response.Knowledge, func(a *knowledge.Knowledge) *model.KnowledgeDetail {
|
||||
KnowledgeDetails: slices.Transform(response.Knowledge, func(a *model.Knowledge) *model.KnowledgeDetail {
|
||||
return &model.KnowledgeDetail{
|
||||
ID: a.ID,
|
||||
Name: a.Name,
|
||||
@ -13,7 +13,7 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
knowledge "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
knowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package knowledge
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/bytedance/sonic"
|
||||
@ -21,19 +21,19 @@ import (
|
||||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity"
|
||||
)
|
||||
|
||||
//go:generate mockgen -destination messagemock/message_mock.go --package messagemock -source message.go
|
||||
type Message interface {
|
||||
GetByRunIDs(ctx context.Context, conversationID int64, runIDs []int64) ([]*message.Message, error)
|
||||
PreCreate(ctx context.Context, msg *message.Message) (*message.Message, error)
|
||||
Create(ctx context.Context, msg *message.Message) (*message.Message, error)
|
||||
BatchCreate(ctx context.Context, msg []*message.Message) ([]*message.Message, error)
|
||||
GetByRunIDs(ctx context.Context, conversationID int64, runIDs []int64) ([]*model.Message, error)
|
||||
PreCreate(ctx context.Context, msg *model.Message) (*model.Message, error)
|
||||
Create(ctx context.Context, msg *model.Message) (*model.Message, error)
|
||||
BatchCreate(ctx context.Context, msg []*model.Message) ([]*model.Message, error)
|
||||
List(ctx context.Context, meta *entity.ListMeta) (*entity.ListResult, error)
|
||||
ListWithoutPair(ctx context.Context, req *entity.ListMeta) (*entity.ListResult, error)
|
||||
Edit(ctx context.Context, msg *message.Message) (*message.Message, error)
|
||||
Edit(ctx context.Context, msg *model.Message) (*model.Message, error)
|
||||
Delete(ctx context.Context, req *entity.DeleteMeta) error
|
||||
GetMessageByID(ctx context.Context, id int64) (*entity.Message, error)
|
||||
MessageList(ctx context.Context, req *MessageListRequest) (*MessageListResponse, error)
|
||||
@ -43,7 +43,7 @@ type Message interface {
|
||||
|
||||
var defaultSVC Message
|
||||
|
||||
type MessageMeta = message.Message
|
||||
type MessageMeta = model.Message
|
||||
|
||||
func DefaultSVC() Message {
|
||||
return defaultSVC
|
||||
@ -71,10 +71,10 @@ type MessageListResponse struct {
|
||||
}
|
||||
|
||||
type Content struct {
|
||||
Type message.InputType `json:"type"`
|
||||
Text *string `json:"text,omitempty"`
|
||||
Uri *string `json:"uri,omitempty"`
|
||||
Url *string `json:"url,omitempty"`
|
||||
Type model.InputType `json:"type"`
|
||||
Text *string `json:"text,omitempty"`
|
||||
Uri *string `json:"uri,omitempty"`
|
||||
Url *string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
type WfMessage struct {
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package message
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -23,9 +23,9 @@ import (
|
||||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/contract/agentrun"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
crossagentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
agententity "github.com/coze-dev/coze-studio/backend/domain/conversation/agentrun/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow"
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package message
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -24,8 +24,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/storage"
|
||||
@ -29,8 +29,8 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
message "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
message0 "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
message "github.com/coze-dev/coze-studio/backend/crossdomain/message/model"
|
||||
message0 "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
entity "github.com/coze-dev/coze-studio/backend/domain/conversation/message/entity"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package message
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/cloudwego/eino/schema"
|
||||
@ -21,8 +21,8 @@ import (
|
||||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
workflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
)
|
||||
|
||||
@ -23,9 +23,9 @@ import (
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
"github.com/coze-dev/coze-studio/backend/types/errno"
|
||||
)
|
||||
@ -18,7 +18,7 @@ package convert
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
)
|
||||
|
||||
var authTypes = map[common.AuthorizationType]consts.AuthzType{
|
||||
@ -18,7 +18,7 @@ package convert
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
)
|
||||
|
||||
var assistTypeToFormat = map[consts.APIFileAssistType]string{
|
||||
@ -20,7 +20,7 @@ import (
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
)
|
||||
|
||||
var httpParamLocations = map[common.ParameterLocation]consts.HTTPParamLocation{
|
||||
@ -18,7 +18,7 @@ package convert
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
)
|
||||
|
||||
var pluginTypes = map[common.PluginType]consts.PluginType{
|
||||
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package plugin
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
crossplugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
plugin "github.com/coze-dev/coze-studio/backend/domain/plugin/service"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/storage"
|
||||
@ -23,7 +23,7 @@ import (
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
)
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
"github.com/cloudwego/eino/schema"
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
package model
|
||||
|
||||
import "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
import "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
|
||||
type ExecuteToolOption struct {
|
||||
ProjectInfo *ProjectInfo
|
||||
@ -23,7 +23,7 @@ import (
|
||||
"strings"
|
||||
|
||||
api "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/encrypt"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
"github.com/coze-dev/coze-studio/backend/types/errno"
|
||||
@ -28,8 +28,8 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/convert"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
|
||||
)
|
||||
@ -30,8 +30,8 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
schema "github.com/cloudwego/eino/schema"
|
||||
workflow "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
workflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
entity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
@ -19,7 +19,7 @@ package search
|
||||
import (
|
||||
"context"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/search/model"
|
||||
)
|
||||
|
||||
type Search interface {
|
||||
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package search
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search"
|
||||
crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/contract/search"
|
||||
crosssearch "github.com/coze-dev/coze-studio/backend/crossdomain/search"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/search/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/search/service"
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package search
|
||||
package model
|
||||
|
||||
import (
|
||||
resource "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package search
|
||||
package model
|
||||
|
||||
import (
|
||||
resource "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package upload
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/contract/upload"
|
||||
crossupload "github.com/coze-dev/coze-studio/backend/crossdomain/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/upload/service"
|
||||
)
|
||||
|
||||
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package crossuser
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/contract/user"
|
||||
crossuser "github.com/coze-dev/coze-studio/backend/crossdomain/user"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/user/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/user/service"
|
||||
)
|
||||
@ -19,9 +19,9 @@ package variables
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
variables "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity"
|
||||
)
|
||||
|
||||
@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package variables
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/contract/variables"
|
||||
crossvariables "github.com/coze-dev/coze-studio/backend/crossdomain/variables"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/variables/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity"
|
||||
variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service"
|
||||
)
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package variables
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
@ -23,7 +23,7 @@ import (
|
||||
einoCompose "github.com/cloudwego/eino/compose"
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity"
|
||||
workflowEntity "github.com/coze-dev/coze-studio/backend/domain/workflow/entity"
|
||||
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package workflow
|
||||
package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -23,8 +23,8 @@ import (
|
||||
einoCompose "github.com/cloudwego/eino/compose"
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow"
|
||||
workflowModel "github.com/coze-dev/coze-studio/backend/crossdomain/workflow/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity"
|
||||
workflowEntity "github.com/coze-dev/coze-studio/backend/domain/workflow/entity"
|
||||
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package workflow
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/contract/message"
|
||||
crossmessage "github.com/coze-dev/coze-studio/backend/crossdomain/message"
|
||||
)
|
||||
|
||||
type Locator uint8
|
||||
@ -16,8 +16,8 @@
|
||||
|
||||
package entity
|
||||
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
import model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
|
||||
type AgentEvent = singleagent.AgentEvent
|
||||
type AgentEvent = model.AgentEvent
|
||||
|
||||
type InterruptEventType = singleagent.InterruptEventType
|
||||
type InterruptEventType = model.InterruptEventType
|
||||
|
||||
@ -17,17 +17,19 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
model "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
)
|
||||
|
||||
// Use composition instead of aliasing for domain entities to enhance extensibility
|
||||
type SingleAgent struct {
|
||||
*singleagent.SingleAgent
|
||||
*model.SingleAgent
|
||||
}
|
||||
|
||||
type AgentIdentity = singleagent.AgentIdentity
|
||||
type AgentIdentity = model.AgentIdentity
|
||||
|
||||
type ExecuteRequest = singleagent.ExecuteRequest
|
||||
type ExecuteRequest = model.ExecuteRequest
|
||||
|
||||
type InterruptInfo = model.InterruptInfo
|
||||
|
||||
type DuplicateInfo struct {
|
||||
UserID int64
|
||||
|
||||
@ -26,10 +26,10 @@ import (
|
||||
"github.com/cloudwego/eino/compose"
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
"github.com/coze-dev/coze-studio/backend/bizpkg/config/modelmgr"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
|
||||
singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
agentrun "github.com/coze-dev/coze-studio/backend/crossdomain/agentrun/model"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/logs"
|
||||
|
||||
@ -29,10 +29,10 @@ import (
|
||||
"github.com/cloudwego/eino/compose"
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/consts"
|
||||
plugin "github.com/coze-dev/coze-studio/backend/crossdomain/contract/plugin/model"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
|
||||
singleagent "github.com/coze-dev/coze-studio/backend/crossdomain/agent/model"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/plugin/consts"
|
||||
plugin "github.com/coze-dev/coze-studio/backend/crossdomain/plugin/model"
|
||||
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/logs"
|
||||
|
||||
@ -25,8 +25,8 @@ import (
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge"
|
||||
crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/crossdomain/knowledge/model"
|
||||
knowledgeEntity "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
|
||||
@ -31,9 +31,9 @@ import (
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
|
||||
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/database"
|
||||
database "github.com/coze-dev/coze-studio/backend/crossdomain/database/model"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/sqlparser"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user