func NewInternalAPI(middlewares ...gin.HandlerFunc) (*Internal, error) {
	r := gin.Default()
	r.RedirectTrailingSlash = true
	for _, m := range middlewares {
		r.Use(m)
	}
	p := ginprometheus.NewPrometheus("phoenix_internal", []string{})
	p.SetListenAddress(":9900")
	p.Use(r, "/metrics")
	r.GET("/", LongVersion)
	r.GET("/healthz", Healthz)
	v1 := r.Group("v1")
	v1.POST("/batch", Batch)
	v1.GET("/batch/status/:id", BatchStatus)
	sc := v1.Group("/streaming")
	sc.POST("/", CreateStreaming)
	sc.PUT("/", UpdateStreaming)
	sc.DELETE("/", DeleteStreaming)
	sc.DELETE("/recommendation", DeleteRecommendation)
	mg := v1.Group("/management")
	mc := mg.Group("/containers")
	mc.GET("/", GetContainer)
	mc.POST("/", CreateContainer)
	mc.DELETE("/", EmptyContainer)
	mc.GET("/all", GetAllContainers)
	mc.PUT("/link-model", LinkModel)
	mm := mg.Group("/models")
	mm.GET("/", GetModel)
	mm.POST("/", CreateModel)
	mm.DELETE("/", EmptyModel)
	mm.GET("/preview", GetDataPreview)
	mm.GET("/all", GetAllModels)
	return &Internal{
		App: r,
	}, nil
}
NewInternalAPI creates the o object
package internal
import (
	ginprometheus "github.com/banzaicloud/go-gin-prometheus"
	"github.com/gin-gonic/gin"
)
type Internal struct {
	App *gin.Engine
}