21 lines
667 B
Go
21 lines
667 B
Go
package router
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
// setupAIAPIRoutes 配置 AI 相关 API 路由
|
|
func (r *Router) setupAIAPIRoutes(api *gin.RouterGroup) {
|
|
aiGroup := api.Group("/ai")
|
|
{
|
|
aiGroup.POST("/polish", r.aiHandler.PolishText)
|
|
aiGroup.GET("/provider", r.aiHandler.GetProviderInfo)
|
|
|
|
agentGroup := aiGroup.Group("/agent")
|
|
{
|
|
agentGroup.POST("/polish", r.aiHandler.AgentPolish)
|
|
agentGroup.POST("/analyze", r.aiHandler.AgentAnalyze)
|
|
agentGroup.POST("/generate-questions", r.aiHandler.GenerateQuestions)
|
|
agentGroup.POST("/evaluate-answers", r.aiHandler.EvaluateAnswers)
|
|
agentGroup.POST("/submit-answers", r.aiHandler.SubmitAnswers)
|
|
}
|
|
}
|
|
} |