Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ WORKDIR /app
EXPOSE 8080
COPY --from=builder /builder/bin .

ENTRYPOINT ["/app/azure-openai-proxy"]
USER 1000:1000

ENTRYPOINT ["/app/azure-openai-proxy"]
2 changes: 1 addition & 1 deletion azure/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (c *StripPrefixConverter) Convert(req *http.Request, config *DeploymentConf
req.Host = config.EndpointUrl.Host
req.URL.Scheme = config.EndpointUrl.Scheme
req.URL.Host = config.EndpointUrl.Host
req.URL.Path = path.Join(fmt.Sprintf("/openai/deployments/%s", config.DeploymentName), strings.Replace(req.URL.Path, c.Prefix+"/", "/", 1))
req.URL.Path = path.Join(config.EndpointUrl.Path, fmt.Sprintf("/openai/deployments/%s", config.DeploymentName), strings.Replace(req.URL.Path, c.Prefix+"/", "/", 1))
req.URL.RawPath = req.URL.EscapedPath()

query := req.URL.Query()
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

set -e

VERSION=v1.1.0
VERSION=v1.3.10

rm -rf bin

export GOOS=linux
export GOARCH=amd64
go build -trimpath -ldflags "-s -w" -o bin/azure-openai-proxy ./cmd

docker build -t stulzq/azure-openai-proxy:$VERSION .
docker buildx build --platform linux/amd64 -t stulzq/azure-openai-proxy:$VERSION .