mirror of
https://gitee.com/samwaf/SamWaf.git
synced 2025-12-06 14:59:18 +08:00
18 lines
343 B
Go
18 lines
343 B
Go
package router
|
|
|
|
import (
|
|
"SamWaf/api"
|
|
"SamWaf/middleware"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type WafGPTRouter struct {
|
|
}
|
|
|
|
func (receiver *WafGPTRouter) InitGPTRouter(group *gin.RouterGroup) {
|
|
api := api.APIGroupAPP.WafGPTApi
|
|
router := group.Group("")
|
|
router.Use(middleware.StreamMiddleware())
|
|
router.POST("/samwaf/gpt/chat", api.ChatApi)
|
|
}
|