Gpt (#1389)
* fix:优化自动化代码搜索区域 (#1382) * 增加gpt功能(万用表格) * feat: chatTable页面 --------- Co-authored-by: ipanghu <bypanghu@163.com> Co-authored-by: 陶正虎 <zhenghu.tao@jutze.com.cn> Co-authored-by: krank <emosick@qq.com>
This commit is contained in:
@@ -151,6 +151,11 @@ func (i *initApi) InitializeData(ctx context.Context) (context.Context, error) {
|
||||
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/setAuthorityBtn", Description: "设置按钮权限"},
|
||||
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/getAuthorityBtn", Description: "获取已有按钮权限"},
|
||||
{ApiGroup: "按钮权限", Method: "POST", Path: "/authorityBtn/canRemoveAuthorityBtn", Description: "删除按钮"},
|
||||
|
||||
{ApiGroup: "万用表格", Method: "POST", Path: "/chatGpt/getTable", Description: "通过gpt获取内容"},
|
||||
{ApiGroup: "万用表格", Method: "POST", Path: "/chatGpt/createSK", Description: "录入sk"},
|
||||
{ApiGroup: "万用表格", Method: "GET", Path: "/chatGpt/getSK", Description: "获取sk"},
|
||||
{ApiGroup: "万用表格", Method: "DELETE", Path: "/chatGpt/deleteSK", Description: "删除sk"},
|
||||
}
|
||||
if err := db.Create(&entities).Error; err != nil {
|
||||
return ctx, errors.Wrap(err, sysModel.SysApi{}.TableName()+"表数据初始化失败!")
|
||||
|
@@ -152,6 +152,11 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
|
||||
{Ptype: "p", V0: "888", V1: "/authorityBtn/getAuthorityBtn", V2: "POST"},
|
||||
{Ptype: "p", V0: "888", V1: "/authorityBtn/canRemoveAuthorityBtn", V2: "POST"},
|
||||
|
||||
{Ptype: "p", V0: "888", V1: "/chatGpt/getTable", V2: "POST"},
|
||||
{Ptype: "p", V0: "888", V1: "/chatGpt/createSK", V2: "POST"},
|
||||
{Ptype: "p", V0: "888", V1: "/chatGpt/getSK", V2: "GET"},
|
||||
{Ptype: "p", V0: "888", V1: "/chatGpt/deleteSK", V2: "DELETE"},
|
||||
|
||||
{Ptype: "p", V0: "8881", V1: "/base/login", V2: "POST"},
|
||||
{Ptype: "p", V0: "8881", V1: "/user/admin_register", V2: "POST"},
|
||||
{Ptype: "p", V0: "8881", V1: "/api/createApi", V2: "POST"},
|
||||
|
@@ -79,6 +79,7 @@ func (i *initMenu) InitializeData(ctx context.Context) (next context.Context, er
|
||||
{MenuLevel: 0, Hidden: false, ParentId: "25", Path: "installPlugin", Name: "installPlugin", Component: "view/systemTools/installPlugin/index.vue", Sort: 1, Meta: Meta{Title: "插件安装", Icon: "box"}},
|
||||
{MenuLevel: 0, Hidden: false, ParentId: "25", Path: "autoPlug", Name: "autoPlug", Component: "view/systemTools/autoPlug/autoPlug.vue", Sort: 2, Meta: Meta{Title: "插件模板", Icon: "folder"}},
|
||||
{MenuLevel: 0, Hidden: false, ParentId: "25", Path: "plugin-email", Name: "plugin-email", Component: "plugin/email/view/index.vue", Sort: 3, Meta: Meta{Title: "邮件插件", Icon: "message"}},
|
||||
{MenuLevel: 0, Hidden: false, ParentId: "16", Path: "chatTable", Name: "chatTable", Component: "view/chatgpt/chatTable.vue", Sort: 6, Meta: Meta{Title: "万用表格", Icon: "chat-dot-square"}},
|
||||
}
|
||||
if err = db.Create(&entities).Error; err != nil {
|
||||
return ctx, errors.Wrap(err, SysBaseMenu{}.TableName()+"表数据初始化失败!")
|
||||
|
@@ -24,7 +24,7 @@ func (i *initUser) MigrateTable(ctx context.Context) (context.Context, error) {
|
||||
if !ok {
|
||||
return ctx, system.ErrMissingDBContext
|
||||
}
|
||||
return ctx, db.AutoMigrate(&sysModel.SysUser{})
|
||||
return ctx, db.AutoMigrate(&sysModel.SysUser{}, &sysModel.SysChatGptOption{})
|
||||
}
|
||||
|
||||
func (i *initUser) TableCreated(ctx context.Context) bool {
|
||||
|
Reference in New Issue
Block a user