Remove a trailing slash from the API URL in case it gets added in by URL.toString
| @@ -337,7 +337,7 @@ async function sendMakerSuiteRequest(request, response) { | ||
| 337 | 337 | ? (stream ? 'streamGenerateContent' : 'generateContent') |
| 338 | 338 | : (isText ? 'generateText' : 'generateMessage'); |
| 339 | 339 | |
| 340 | 340 | const generateResponse = await fetch(`${apiUrl.toString().replace(/\/$/, '')}/${apiVersion}/models/${model}:${responseType}?key=${apiKey}${stream ? '&alt=sse' : ''}`, { |
| 341 | 341 | body: JSON.stringify(body), |
| 342 | 342 | method: 'POST', |
| 343 | 343 | headers: { |