continue icon indicating copy to clipboard operation
continue copied to clipboard

Support proxies/costum apiBase for Gemini

Open rexkyng opened this issue 2 years ago • 1 comments

Validations

  • [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [X] I'm not able to find an open issue that requests the same enhancement

Problem

Gemini is not currently supported in my region, but I am able to access it features through proxies,

the proxy that I'm currently using: https://github.com/antergone/palm-netlify-proxy

Solution

Update core/llm/llms/Gemini.ts to allow for an optional custom apiBase instead of the now hard coded one similar to using an OpenAI compatible server / API, with the update config like this:

{
  "models": [
    {
      "title": "Gemini Pro",
      "provider": "google-palm",
      "model": "gemini-pro",
      "apiKey": "YOUR_API_KEY",
      "apiBase": "http://localhost:8000"
    }
  ]
}

rexkyng avatar Feb 14 '24 09:02 rexkyng

@timescam just made the change (https://github.com/continuedev/continue/commit/989777602a8e7f7b3c75bfa8fa1cc744f42d6f3c) and will be in next pre-release version

sestinj avatar Feb 19 '24 18:02 sestinj