mirror of
https://github.com/gotoeasy/glogcenter.git
synced 2025-09-15 12:58:34 +08:00
取消chatai
This commit is contained in:
parent
a086e48aae
commit
430aa6bbf1
@ -61,7 +61,6 @@ var tokenSalt string
|
||||
var aryWhite []string
|
||||
var aryBlack []string
|
||||
var ipAddCity bool
|
||||
var enableChatAi bool
|
||||
|
||||
func init() {
|
||||
UpdateConfigByEnv()
|
||||
@ -107,12 +106,6 @@ func UpdateConfigByEnv() {
|
||||
nearSearchSize = getNearSearchSizeConf(cmn.GetEnvInt("GLC_NEAR_SEARCH_SIZE", 200)) // 定位相邻检索的查询件数,默认200(有效范围50~1000)
|
||||
mulitLineSearch = cmn.GetEnvBool("GLC_SEARCH_MULIT_LINE", false) // 是否检索日志的全部行(日志可能有换行),默认false仅第一行
|
||||
testMode = cmn.GetEnvBool("GLC_TEST_MODE", false) // 是否测试模式,默认false
|
||||
enableChatAi = cmn.GetEnvBool("GLC_ENABLE_CHATAI", true) // 是否开启GLC智能助手,默认true
|
||||
}
|
||||
|
||||
// 取配置: 是否开启GLC智能助手
|
||||
func IsEnableChatAi() bool {
|
||||
return enableChatAi
|
||||
}
|
||||
|
||||
// 取配置: 定位相邻检索的查询件数,可通过环境变量“GLC_NEAR_SEARCH_SIZE”设定,默认200件
|
||||
|
||||
@ -57,7 +57,6 @@ func Run() {
|
||||
gweb.RegisterController(method.POST, contextPath+conf.SysUserTransferChgPsw, controller.UserTransferChangePswController) // [用户]转发修改自己密码
|
||||
gweb.RegisterController(method.POST, contextPath+conf.SysUserTransferSave, controller.UserTransferSaveController) // [用户]转发保存
|
||||
gweb.RegisterController(method.POST, contextPath+conf.SysUserTransferDel, controller.UserTransferDelController) // [用户]转发删除
|
||||
gweb.RegisterController(method.POST, contextPath+"/v1/sys/chatai", controller.ChatAiController) // 查询是否开启智能助手
|
||||
|
||||
// 集群操作接口
|
||||
gweb.RegisterController(method.POST, contextPath+"/sys/cluster/info", controller.ClusterGetClusterInfoController) // 获取集群信息
|
||||
|
||||
@ -16,11 +16,6 @@ import (
|
||||
var glcLatest string = ""
|
||||
var glcOrigin string = ""
|
||||
|
||||
// 查询是否开启智能助手
|
||||
func ChatAiController(req *gweb.HttpRequest) *gweb.HttpResult {
|
||||
return gweb.Result(conf.IsEnableChatAi())
|
||||
}
|
||||
|
||||
// 查询是否测试模式
|
||||
func TestModeController(req *gweb.HttpRequest) *gweb.HttpResult {
|
||||
return gweb.Result(conf.IsTestMode())
|
||||
|
||||
@ -60,7 +60,7 @@ export const getUserMenu = async () => {
|
||||
openInner: true,
|
||||
});
|
||||
|
||||
let rs = await $post('/v1/user/enableLogin', {}, null, { 'Content-Type': 'application/x-www-form-urlencoded' });
|
||||
const rs = await $post('/v1/user/enableLogin', {}, null, { 'Content-Type': 'application/x-www-form-urlencoded' });
|
||||
if (rs.success && rs.result) {
|
||||
menus.push({
|
||||
path: '/glc/sysuser',
|
||||
@ -72,16 +72,5 @@ export const getUserMenu = async () => {
|
||||
});
|
||||
}
|
||||
|
||||
rs = await $post('/v1/sys/chatai', {}, null, { 'Content-Type': 'application/x-www-form-urlencoded' });
|
||||
if (rs.success && rs.result) {
|
||||
menus.push({
|
||||
path: '/glc/chatai',
|
||||
title: 'GLC智能助手',
|
||||
icon: 'ai',
|
||||
component: 'https://ai.youdao.com/saas/qanything/#/bots/C9BA280AA796491F/share',
|
||||
openInner: true,
|
||||
});
|
||||
}
|
||||
|
||||
return (menuState.aryMenu = menus);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user