Skip to content

Commit

Permalink
Fix/gemini app endpoint (ChatGPTNextWeb#4017)
Browse files Browse the repository at this point in the history
* fix: support custom api endpoint

* fix: attach api key to google gemini
  • Loading branch information
fred-bf committed Feb 7, 2024
1 parent b8f0822 commit d74f636
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/client/platforms/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ export class GeminiProApi implements LLMApi {

if (!baseUrl) {
baseUrl = isApp
? DEFAULT_API_HOST +
"/api/proxy/google/" +
Google.ChatPath +
`?key=${accessStore.googleApiKey}`
? DEFAULT_API_HOST + "/api/proxy/google/" + Google.ChatPath
: chatPath;
}

if (isApp) {
baseUrl += `?key=${accessStore.googleApiKey}`;
}
const chatPayload = {
method: "POST",
body: JSON.stringify(requestPayload),
Expand Down

0 comments on commit d74f636

Please sign in to comment.