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:
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
@@ -48,7 +64,9 @@ func newSingleAgentDraft(db *gorm.DB, opts ...gen.DOOption) singleAgentDraft {
|
||||
_singleAgentDraft.JumpConfig = field.NewField(tableName, "jump_config")
|
||||
_singleAgentDraft.BackgroundImageInfoList = field.NewField(tableName, "background_image_info_list")
|
||||
_singleAgentDraft.DatabaseConfig = field.NewField(tableName, "database_config")
|
||||
_singleAgentDraft.BotMode = field.NewInt32(tableName, "bot_mode")
|
||||
_singleAgentDraft.ShortcutCommand = field.NewField(tableName, "shortcut_command")
|
||||
_singleAgentDraft.LayoutInfo = field.NewField(tableName, "layout_info")
|
||||
|
||||
_singleAgentDraft.fillFieldMap()
|
||||
|
||||
@@ -81,7 +99,9 @@ type singleAgentDraft struct {
|
||||
JumpConfig field.Field // Jump Configuration
|
||||
BackgroundImageInfoList field.Field // Background image
|
||||
DatabaseConfig field.Field // Agent Database Base Configuration
|
||||
BotMode field.Int32 // mod,0:single mode 2:chatflow mode
|
||||
ShortcutCommand field.Field // shortcut command
|
||||
LayoutInfo field.Field // chatflow layout info
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
@@ -119,7 +139,9 @@ func (s *singleAgentDraft) updateTableName(table string) *singleAgentDraft {
|
||||
s.JumpConfig = field.NewField(table, "jump_config")
|
||||
s.BackgroundImageInfoList = field.NewField(table, "background_image_info_list")
|
||||
s.DatabaseConfig = field.NewField(table, "database_config")
|
||||
s.BotMode = field.NewInt32(table, "bot_mode")
|
||||
s.ShortcutCommand = field.NewField(table, "shortcut_command")
|
||||
s.LayoutInfo = field.NewField(table, "layout_info")
|
||||
|
||||
s.fillFieldMap()
|
||||
|
||||
@@ -136,7 +158,7 @@ func (s *singleAgentDraft) GetFieldByName(fieldName string) (field.OrderExpr, bo
|
||||
}
|
||||
|
||||
func (s *singleAgentDraft) fillFieldMap() {
|
||||
s.fieldMap = make(map[string]field.Expr, 22)
|
||||
s.fieldMap = make(map[string]field.Expr, 24)
|
||||
s.fieldMap["id"] = s.ID
|
||||
s.fieldMap["agent_id"] = s.AgentID
|
||||
s.fieldMap["creator_id"] = s.CreatorID
|
||||
@@ -158,7 +180,9 @@ func (s *singleAgentDraft) fillFieldMap() {
|
||||
s.fieldMap["jump_config"] = s.JumpConfig
|
||||
s.fieldMap["background_image_info_list"] = s.BackgroundImageInfoList
|
||||
s.fieldMap["database_config"] = s.DatabaseConfig
|
||||
s.fieldMap["bot_mode"] = s.BotMode
|
||||
s.fieldMap["shortcut_command"] = s.ShortcutCommand
|
||||
s.fieldMap["layout_info"] = s.LayoutInfo
|
||||
}
|
||||
|
||||
func (s singleAgentDraft) clone(db *gorm.DB) singleAgentDraft {
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
@@ -50,7 +66,9 @@ func newSingleAgentVersion(db *gorm.DB, opts ...gen.DOOption) singleAgentVersion
|
||||
_singleAgentVersion.Version = field.NewString(tableName, "version")
|
||||
_singleAgentVersion.BackgroundImageInfoList = field.NewField(tableName, "background_image_info_list")
|
||||
_singleAgentVersion.DatabaseConfig = field.NewField(tableName, "database_config")
|
||||
_singleAgentVersion.BotMode = field.NewInt32(tableName, "bot_mode")
|
||||
_singleAgentVersion.ShortcutCommand = field.NewField(tableName, "shortcut_command")
|
||||
_singleAgentVersion.LayoutInfo = field.NewField(tableName, "layout_info")
|
||||
|
||||
_singleAgentVersion.fillFieldMap()
|
||||
|
||||
@@ -85,7 +103,9 @@ type singleAgentVersion struct {
|
||||
Version field.String // Agent Version
|
||||
BackgroundImageInfoList field.Field // Background image
|
||||
DatabaseConfig field.Field // Agent Database Base Configuration
|
||||
BotMode field.Int32 // mod,0:single mode 2:chatflow mode
|
||||
ShortcutCommand field.Field // shortcut command
|
||||
LayoutInfo field.Field // chatflow layout info
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
@@ -125,7 +145,9 @@ func (s *singleAgentVersion) updateTableName(table string) *singleAgentVersion {
|
||||
s.Version = field.NewString(table, "version")
|
||||
s.BackgroundImageInfoList = field.NewField(table, "background_image_info_list")
|
||||
s.DatabaseConfig = field.NewField(table, "database_config")
|
||||
s.BotMode = field.NewInt32(table, "bot_mode")
|
||||
s.ShortcutCommand = field.NewField(table, "shortcut_command")
|
||||
s.LayoutInfo = field.NewField(table, "layout_info")
|
||||
|
||||
s.fillFieldMap()
|
||||
|
||||
@@ -142,7 +164,7 @@ func (s *singleAgentVersion) GetFieldByName(fieldName string) (field.OrderExpr,
|
||||
}
|
||||
|
||||
func (s *singleAgentVersion) fillFieldMap() {
|
||||
s.fieldMap = make(map[string]field.Expr, 24)
|
||||
s.fieldMap = make(map[string]field.Expr, 26)
|
||||
s.fieldMap["id"] = s.ID
|
||||
s.fieldMap["agent_id"] = s.AgentID
|
||||
s.fieldMap["creator_id"] = s.CreatorID
|
||||
@@ -166,7 +188,9 @@ func (s *singleAgentVersion) fillFieldMap() {
|
||||
s.fieldMap["version"] = s.Version
|
||||
s.fieldMap["background_image_info_list"] = s.BackgroundImageInfoList
|
||||
s.fieldMap["database_config"] = s.DatabaseConfig
|
||||
s.fieldMap["bot_mode"] = s.BotMode
|
||||
s.fieldMap["shortcut_command"] = s.ShortcutCommand
|
||||
s.fieldMap["layout_info"] = s.LayoutInfo
|
||||
}
|
||||
|
||||
func (s singleAgentVersion) clone(db *gorm.DB) singleAgentVersion {
|
||||
|
||||
Reference in New Issue
Block a user