feat(qa): add synthesis conversations with source retention (#52)
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/tradarr/backend/internal/api/handlers"
|
||||
"github.com/tradarr/backend/internal/auth"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func SetupRouter(h *handlers.Handler, jwtSecret string) *gin.Engine {
|
||||
@ -13,7 +14,9 @@ func SetupRouter(h *handlers.Handler, jwtSecret string) *gin.Engine {
|
||||
SkipPaths: []string{"/api/summaries/status"},
|
||||
// Never log rejected test query parameters or arbitrary model IDs. Test
|
||||
// outcomes are bounded responses; no generation data belongs in access logs.
|
||||
Skip: func(c *gin.Context) bool { return c.FullPath() == "/api/admin/ai-models/:id/test" },
|
||||
Skip: func(c *gin.Context) bool {
|
||||
return c.FullPath() == "/api/admin/ai-models/:id/test" || (strings.HasPrefix(c.Request.URL.Path, "/api/summaries/") && strings.Contains(c.Request.URL.Path, "/conversation"))
|
||||
},
|
||||
}))
|
||||
|
||||
r.Use(func(c *gin.Context) {
|
||||
@ -53,6 +56,10 @@ func SetupRouter(h *handlers.Handler, jwtSecret string) *gin.Engine {
|
||||
authed.GET("/summaries/status", h.GetGeneratingStatus)
|
||||
authed.POST("/summaries/generate", h.GenerateSummary)
|
||||
|
||||
authed.GET("/summaries/:id/conversation", h.GetSummaryConversation)
|
||||
authed.POST("/summaries/:id/conversation/messages", h.AskSummaryQuestion)
|
||||
authed.DELETE("/summaries/:id/conversation", h.DeleteSummaryConversation)
|
||||
|
||||
authed.GET("/reports", h.ListReports)
|
||||
authed.POST("/reports", h.CreateReport)
|
||||
authed.DELETE("/reports/:id", h.DeleteReport)
|
||||
|
||||
Reference in New Issue
Block a user