取消chatai

This commit is contained in:
gotoeasy 2025-05-05 16:20:29 +08:00
parent a086e48aae
commit 430aa6bbf1
4 changed files with 1 additions and 25 deletions

View File

@ -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件

View File

@ -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) // 获取集群信息

View File

@ -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())

View File

@ -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);
};