From 93c788994bb14d9f9fb87bb79278c00757d9524d Mon Sep 17 00:00:00 2001 From: yx135 <120313253+yx135@users.noreply.github.com> Date: Sat, 8 Jun 2024 10:44:36 +0800 Subject: [PATCH] Update main.go --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e578ad7..b1caf0a 100644 --- a/main.go +++ b/main.go @@ -176,10 +176,10 @@ func (s *ProxyService) InitRoutes(e *gin.Engine) { authToken := s.cfg.AuthToken // replace with your dynamic value as needed if authToken != "" { // 鉴权 - v1 := e.Group("/:token/v1/", AuthMiddleware(authToken)) + v1 := e.Group("/:token/", AuthMiddleware(authToken)) { v1.POST("/chat/completions", s.completions) - v1.POST("/engines/copilot-codex/completions", s.codeCompletions) + v1.POST("/v1/engines/copilot-codex/completions", s.codeCompletions) } } else { e.POST("/chat/completions", s.completions)