feat: playground

This commit is contained in:
1808837298@qq.com
2024-09-26 00:59:09 +08:00
parent 9fe1f35fd1
commit 9a4ca1e210
22 changed files with 3829 additions and 1850 deletions

View File

@@ -16,6 +16,11 @@ func SetRelayRouter(router *gin.Engine) {
modelsRouter.GET("", controller.ListModels)
modelsRouter.GET("/:model", controller.RetrieveModel)
}
playgroundRouter := router.Group("/pg")
playgroundRouter.Use(middleware.UserAuth())
{
playgroundRouter.POST("/chat/completions", controller.Playground)
}
relayV1Router := router.Group("/v1")
relayV1Router.Use(middleware.TokenAuth(), middleware.Distribute())
{