Merge pull request #2926 from notfiz/gemini-fix

fix google-ai reverse proxy ignoring user provided path
This commit is contained in:
Cohee 2024-10-01 01:28:23 +03:00 committed by GitHub
commit 63c74468fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -323,7 +323,7 @@ async function sendMakerSuiteRequest(request, response) {
? (stream ? 'streamGenerateContent' : 'generateContent')
: (isText ? 'generateText' : 'generateMessage');
const generateResponse = await fetch(`${apiUrl.origin}/${apiVersion}/models/${model}:${responseType}?key=${apiKey}${stream ? '&alt=sse' : ''}`, {
const generateResponse = await fetch(`${apiUrl}/${apiVersion}/models/${model}:${responseType}?key=${apiKey}${stream ? '&alt=sse' : ''}`, {
body: JSON.stringify(body),
method: 'POST',
headers: {