Changesets · Branches · Tags · Compare
| Changeset | 9e5ceba2cbc77ae452432d8594ce42b6047cc890e758e822c7d181342bcb67db |
|---|---|
| Author | Tomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-06-25 15:43 -07:00 |
| Committer | Tomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-06-25 15:43 -07:00 |
| Parents | 607dd12e068c |
1 file changed
modified packages/openai-adapters/src/apis/Azure.ts +5 −1
| @@ -63,7 +63,11 @@ | ||
| 63 | 63 | "`env.apiVersion` is a required configuration property for Azure OpenAI", |
| 64 | 64 | ); |
| 65 | 65 | } |
| 66 | - url.pathname = `${url.pathname}/openai/deployments/${config.env.deployment}`; | |
| 66 | + | |
| 67 | + const basePathname = `openai/deployments/${config.env.deployment}`; | |
| 68 | + | |
| 69 | + url.pathname = | |
| 70 | + url.pathname === "/" ? basePathname : `${url.pathname}/${basePathname}`; | |
| 67 | 71 | |
| 68 | 72 | queryParams["api-version"] = config.env.apiVersion; |
| 69 | 73 | } |