Update main.go
This commit is contained in:
parent
338de5fab9
commit
b6ddebac92
2
main.go
2
main.go
|
|
@ -176,7 +176,7 @@ func (s *ProxyService) InitRoutes(e *gin.Engine) {
|
||||||
authToken := s.cfg.AuthToken // replace with your dynamic value as needed
|
authToken := s.cfg.AuthToken // replace with your dynamic value as needed
|
||||||
if authToken != "" {
|
if authToken != "" {
|
||||||
// 鉴权
|
// 鉴权
|
||||||
v1 := e.Group("/:token/v1/", AuthMiddleware(authToken))
|
v1 := e.Group("/:token/", AuthMiddleware(authToken))
|
||||||
{
|
{
|
||||||
v1.POST("/chat/completions", s.completions)
|
v1.POST("/chat/completions", s.completions)
|
||||||
v1.POST("/engines/copilot-codex/completions", s.codeCompletions)
|
v1.POST("/engines/copilot-codex/completions", s.codeCompletions)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue