package plant

import "github.com/gin-gonic/gin"

type AiChatRouter struct{}

func (s *AiChatRouter) InitAiChatRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
	aiChatRouter := Router.Group("plant/chat")
	aiChatApi := aiChatApi
	{
		aiChatRouter.GET("stream", aiChatApi.ChatStreamPlant)            // SSE 对话流
		aiChatRouter.POST("sync", aiChatApi.SyncWikiToQdrant)            // 后台知识库同步
		aiChatRouter.GET("history", aiChatApi.GetChatHistory)            // 问答历史列表
		aiChatRouter.POST("history/delete", aiChatApi.DeleteChatHistory) // 删除单条
		aiChatRouter.POST("history/clear", aiChatApi.ClearChatHistory)   // 清空历史
		aiChatRouter.GET("quota", aiChatApi.GetChatQuota)                // 今日剩余额度
	}
	return aiChatRouter
}
