From 984b21e30e30ed83bfe92031e0c9d74ed6869253 Mon Sep 17 00:00:00 2001 From: Jayson Jacobs Date: Tue, 10 Dec 2024 00:14:12 -0700 Subject: [PATCH] use correct url --- README.md | 2 +- docker-compose.yml | 2 +- package.json | 2 +- src/controllers/llm.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2889da..30212b7 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ version: '3.6' services: llmp: - image: ghcr.io/j4ys0n/llm-proxy:1.5.2 + image: ghcr.io/j4ys0n/llm-proxy:1.5.3 container_name: llmp hostname: llmp restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index faaa628..d1eb5c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.6' services: llmp: - image: ghcr.io/j4ys0n/llm-proxy:1.5.2 + image: ghcr.io/j4ys0n/llm-proxy:1.5.3 container_name: llmp hostname: llmp restart: unless-stopped diff --git a/package.json b/package.json index 6d32907..f718bbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "llm-proxy", - "version": "1.5.2", + "version": "1.5.3", "description": "Manages Nginx for reverse proxy to multiple LLMs, with TLS & Bearer Auth tokens", "main": "dist/index.js", "scripts": { diff --git a/src/controllers/llm.ts b/src/controllers/llm.ts index a6f00dd..e7c8d16 100644 --- a/src/controllers/llm.ts +++ b/src/controllers/llm.ts @@ -19,7 +19,7 @@ function getPath(url: string): { path: string, base: string, apiKey?: string } { try { const urlParts = url.split('|') const apiKey = urlParts.length > 1 ? urlParts[1] : undefined - const urlObject = new URL(url) + const urlObject = new URL(urlParts[0]) return { path: urlObject.pathname || '/v1', base: urlObject.origin,