Skip to content

Commit d3c333a

Browse files
marcbuilsMarc BUILS
and
Marc BUILS
authored
fix: Azure OpenAI chat/completion call failed #180 (#181)
Co-authored-by: Marc BUILS <[email protected]>
1 parent bd70cba commit d3c333a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ax/util/apicall.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ export const apiCall = async <TRequest = unknown, TResponse = unknown>(
251251
let timeoutId: NodeJS.Timeout
252252

253253
const baseUrl = new URL(process.env['PROXY'] ?? api.url)
254-
const apiPath = [baseUrl.pathname, api.name]
254+
const apiPath = `${[baseUrl.pathname, api.name]
255255
.filter(Boolean)
256256
.join('/')
257-
.replace(/\/+/g, '/')
257+
.replace(/\/+/g, '/')}${baseUrl.search}`
258258
const apiUrl = new URL(apiPath, baseUrl)
259259

260260
const requestId = crypto.randomUUID()

0 commit comments

Comments
 (0)