feat: Support for Chat Flow & Agent Support for binding a single chat flow (#765)

Co-authored-by: Yu Yang <72337138+tomasyu985@users.noreply.github.com>
Co-authored-by: zengxiaohui <csu.zengxiaohui@gmail.com>
Co-authored-by: lijunwen.gigoo <lijunwen.gigoo@bytedance.com>
Co-authored-by: lvxinyu.1117 <lvxinyu.1117@bytedance.com>
Co-authored-by: liuyunchao.0510 <liuyunchao.0510@bytedance.com>
Co-authored-by: haozhenfei <37089575+haozhenfei@users.noreply.github.com>
Co-authored-by: July <jiangxujin@bytedance.com>
Co-authored-by: tecvan-fe <fanwenjie.fe@bytedance.com>
This commit is contained in:
Zhj
2025-08-28 21:53:32 +08:00
committed by GitHub
parent bbc615a18e
commit d70101c979
503 changed files with 48036 additions and 3427 deletions

View File

@@ -42,6 +42,7 @@ const (
type Conversation struct {
ID int64 `json:"id"`
Name string `json:"name"`
SectionID int64 `json:"section_id"`
AgentID int64 `json:"agent_id"`
ConnectorID int64 `json:"connector_id"`

View File

@@ -13,6 +13,7 @@ type LLMParams struct {
EnableChatHistory bool `json:"enableChatHistory"`
SystemPrompt string `json:"systemPrompt"`
ResponseFormat ResponseFormat `json:"responseFormat"`
ChatHistoryRound int64 `json:"chatHistoryRound"`
}
type ResponseFormat int64

View File

@@ -26,14 +26,6 @@ import (
crossworkflow "github.com/coze-dev/coze-studio/backend/crossdomain/contract/workflow"
)
type AgentRuntime struct {
AgentVersion string
IsDraft bool
SpaceID int64
ConnectorID int64
PreRetrieveTools []*agentrun.Tool
}
type EventType string
const (
@@ -84,6 +76,8 @@ type SingleAgent struct {
JumpConfig *bot_common.JumpConfig
BackgroundImageInfoList []*bot_common.BackgroundImageInfo
Database []*bot_common.Database
BotMode bot_common.BotMode
LayoutInfo *bot_common.LayoutInfo
ShortcutCommand []string
}
@@ -106,6 +100,8 @@ type InterruptInfo struct {
ToolCallID string
InterruptType InterruptEventType
InterruptID string
ChatflowInterrupt *crossworkflow.StateMessage
}
type ExecuteRequest struct {

View File

@@ -16,6 +16,13 @@
package workflow
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"
)
type Locator uint8
const (
@@ -25,21 +32,30 @@ const (
)
type ExecuteConfig struct {
ID int64
From Locator
Version string
CommitID string
Operator int64
Mode ExecuteMode
AppID *int64
AgentID *int64
ConnectorID int64
ConnectorUID string
TaskType TaskType
SyncPattern SyncPattern
InputFailFast bool // whether to fail fast if input conversion has warnings
BizType BizType
Cancellable bool
ID int64
From Locator
Version string
CommitID string
Operator int64
Mode ExecuteMode
AppID *int64
AgentID *int64
ConnectorID int64
ConnectorUID string
TaskType TaskType
SyncPattern SyncPattern
InputFailFast bool // whether to fail fast if input conversion has warnings
BizType BizType
Cancellable bool
WorkflowMode WorkflowMode
RoundID *int64 // if workflow is chat flow, conversation round id is required
InitRoundID *int64 // if workflow is chat flow, init conversation round id is required
ConversationID *int64 // if workflow is chat flow, conversation id is required
UserMessage *schema.Message
ConversationHistory []*crossmessage.WfMessage
ConversationHistorySchemaMessages []*schema.Message
SectionID *int64
MaxHistoryRounds *int32
}
type ExecuteMode string
@@ -50,6 +66,8 @@ const (
ExecuteModeNodeDebug ExecuteMode = "node_debug"
)
type WorkflowMode = workflow.WorkflowMode
type TaskType string
const (