🎨 新增AI客服相关接口
This commit is contained in:
@@ -52,6 +52,7 @@ func RegisterTables() {
|
||||
system.SysAuthorityBtn{},
|
||||
system.SysAutoCode{},
|
||||
system.SysChatGptOption{},
|
||||
system.Aikefu{},
|
||||
|
||||
example.ExaFile{},
|
||||
example.ExaCustomer{},
|
||||
|
14
initialize/kp.go
Normal file
14
initialize/kp.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"miniapp/global"
|
||||
"miniapp/service"
|
||||
"miniapp/utils/flashtext"
|
||||
)
|
||||
|
||||
func InitKp() *flashtext.KeywordProcessor {
|
||||
Kp := flashtext.NewKeywordProcessor(false)
|
||||
global.GVA_Kp = Kp
|
||||
service.ServiceGroupApp.AppServiceGroup.AiKefuService.AddKeyWord()
|
||||
return Kp
|
||||
}
|
@@ -29,7 +29,7 @@ func Routers() *gin.Engine {
|
||||
// Router.StaticFile("/", "./dist/index.html") // 前端网页入口页面
|
||||
|
||||
Router.StaticFS(global.GVA_CONFIG.Local.StorePath, http.Dir(global.GVA_CONFIG.Local.StorePath)) // 为用户头像和文件提供静态地址
|
||||
// Router.Use(middleware.LoadTls()) // 如果需要使用https 请打开此中间件 然后前往 core/server.exe.exe.go 将启动模式 更变为 Router.RunTLS("端口","你的cre/pem文件","你的key文件")
|
||||
// Router.Use(middleware.LoadTls()) // 如果需要使用https 请打开此中间件 然后前往 core/server.exe.exe.exe.go 将启动模式 更变为 Router.RunTLS("端口","你的cre/pem文件","你的key文件")
|
||||
// 跨域,如需跨域可以打开下面的注释
|
||||
// Router.Use(middleware.Cors()) // 直接放行全部跨域请求
|
||||
// Router.Use(middleware.CorsByRules()) // 按照配置的规则放行跨域请求
|
||||
@@ -56,6 +56,7 @@ func Routers() *gin.Engine {
|
||||
appRouter.InitUserRouter(PublicGroup) // 注册用户路由
|
||||
appRouter.InitFavoriteRouter(PublicGroup) // 收藏路由
|
||||
appRouter.InitVisionRouter(PublicGroup) // 视力路由
|
||||
appRouter.InitAiKefuRouter(PublicGroup) // AI客服路由
|
||||
|
||||
}
|
||||
PrivateGroup := Router.Group(global.GVA_CONFIG.System.RouterPrefix)
|
||||
@@ -79,9 +80,10 @@ func Routers() *gin.Engine {
|
||||
exampleRouter.InitCustomerRouter(PrivateGroup) // 客户路由
|
||||
exampleRouter.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由
|
||||
|
||||
systemRouter.InitHospitalRouter(PublicGroup) // 医院路由
|
||||
systemRouter.InitBannerRouter(PublicGroup) // banner路由
|
||||
systemRouter.InitArticleRouter(PublicGroup) // 文章路由
|
||||
systemRouter.InitHospitalRouter(PublicGroup) // 医院路由
|
||||
systemRouter.InitBannerRouter(PublicGroup) // banner路由
|
||||
systemRouter.InitArticleRouter(PublicGroup) // 文章路由
|
||||
systemRouter.InitAiKefuRouterRouter(PrivateGroup) // AI客服路由
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user