Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -32,8 +32,11 @@ COPY --from=builder /src/web/build ./web/build
|
|
32 |
|
33 |
# fix
|
34 |
RUN sed -i 's/router.Group("\/v1")/router.Group("\/v1")\n relayV2Router := router.Group("\/proxies\/v1")Eof/g' router/relay.go
|
|
|
|
|
|
|
|
|
35 |
RUN sed -i 's/Eof/\n relayV2Router.Use(middleware.RelayPanicRecover(), middleware.TokenAuth(), middleware.Distribute())\n {Eof/g' router/relay.go
|
36 |
-
RUN sed -i 's/Eof/\n relayV2Router.GET("\/models", controller.ListModels)\n relayV2Router.GET("\/models\/:model", controller.RetrieveModel)Eof/g' router/relay.go
|
37 |
RUN sed -i 's/Eof/\n relayV2Router.POST("\/chat\/completions", controller.Relay) }/g' router/relay.go
|
38 |
RUN sed -i 's/if strings.HasPrefix(path, "\/v1\/chat\/completions") {/if strings.Contains(path, "\/v1\/chat\/completions") {/g' relay/relaymode/helper.go
|
39 |
RUN cat router/relay.go
|
|
|
32 |
|
33 |
# fix
|
34 |
RUN sed -i 's/router.Group("\/v1")/router.Group("\/v1")\n relayV2Router := router.Group("\/proxies\/v1")Eof/g' router/relay.go
|
35 |
+
RUN sed -i 's/Eof/\n models2Router := router.Group("\/proxies\/v1\/models")Eof/g' router/relay.go
|
36 |
+
RUN sed -i 's/Eof/\n models2Router.Use(middleware.TokenAuth())\n {Eof/g' router/relay.go
|
37 |
+
RUN sed -i 's/Eof/\n models2Router.GET("", controller.ListModels)Eof/g' router/relay.go
|
38 |
+
RUN sed -i 's/Eof/\n models2Router.GET("\/:model", controller.RetrieveModel) }Eof/g' router/relay.go
|
39 |
RUN sed -i 's/Eof/\n relayV2Router.Use(middleware.RelayPanicRecover(), middleware.TokenAuth(), middleware.Distribute())\n {Eof/g' router/relay.go
|
|
|
40 |
RUN sed -i 's/Eof/\n relayV2Router.POST("\/chat\/completions", controller.Relay) }/g' router/relay.go
|
41 |
RUN sed -i 's/if strings.HasPrefix(path, "\/v1\/chat\/completions") {/if strings.Contains(path, "\/v1\/chat\/completions") {/g' relay/relaymode/helper.go
|
42 |
RUN cat router/relay.go
|