Fix/gemini app endpoint (#4017)
* fix: support custom api endpoint * fix: attach api key to google gemini
This commit is contained in:
parent
b8f0822214
commit
d74f636558
|
@ -86,13 +86,13 @@ export class GeminiProApi implements LLMApi {
|
||||||
|
|
||||||
if (!baseUrl) {
|
if (!baseUrl) {
|
||||||
baseUrl = isApp
|
baseUrl = isApp
|
||||||
? DEFAULT_API_HOST +
|
? DEFAULT_API_HOST + "/api/proxy/google/" + Google.ChatPath
|
||||||
"/api/proxy/google/" +
|
|
||||||
Google.ChatPath +
|
|
||||||
`?key=${accessStore.googleApiKey}`
|
|
||||||
: chatPath;
|
: chatPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isApp) {
|
||||||
|
baseUrl += `?key=${accessStore.googleApiKey}`;
|
||||||
|
}
|
||||||
const chatPayload = {
|
const chatPayload = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify(requestPayload),
|
body: JSON.stringify(requestPayload),
|
||||||
|
|
Loading…
Reference in New Issue