feat: playground

This commit is contained in:
1808837298@qq.com committed 2024-09-26 00:59:09 +08:00
1 parent 85dfe50399
commit 07fa9205cb
22 files changed
+3829 -1850

No files matched your search

+5
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())
{