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:
@@ -21,17 +21,31 @@ import (
|
||||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/message"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
)
|
||||
|
||||
// Requests and responses must not reference domain entities and can only use models under api/model/crossdomain.
|
||||
type SingleAgent interface {
|
||||
StreamExecute(ctx context.Context, historyMsg []*message.Message, query *message.Message,
|
||||
agentRuntime *singleagent.AgentRuntime) (*schema.StreamReader[*singleagent.AgentEvent], error)
|
||||
StreamExecute(ctx context.Context,
|
||||
agentRuntime *AgentRuntime) (*schema.StreamReader[*singleagent.AgentEvent], error)
|
||||
ObtainAgentByIdentity(ctx context.Context, identity *singleagent.AgentIdentity) (*singleagent.SingleAgent, error)
|
||||
}
|
||||
|
||||
type AgentRuntime struct {
|
||||
AgentVersion string
|
||||
UserID string
|
||||
AgentID int64
|
||||
IsDraft bool
|
||||
SpaceID int64
|
||||
ConnectorID int64
|
||||
PreRetrieveTools []*agentrun.Tool
|
||||
|
||||
HistoryMsg []*schema.Message
|
||||
Input *schema.Message
|
||||
ResumeInfo *ResumeInfo
|
||||
}
|
||||
|
||||
type ResumeInfo = singleagent.InterruptInfo
|
||||
|
||||
type AgentEvent = singleagent.AgentEvent
|
||||
|
||||
Reference in New Issue
Block a user