From 321050d5b52ffdf95620a157fab668e346bc0c9f Mon Sep 17 00:00:00 2001 From: Peter Zaback Date: Tue, 4 Jun 2024 18:16:15 -0500 Subject: [PATCH] Feat/gemini flash (#1352) * Remove duplicate item from array * Add references to Gemini Flash * Update documentation to ref Gemini Flash --- core/config/types.ts | 1 + core/llm/autodetect.ts | 1 - docs/docs/reference/Model Providers/geminiapi.md | 4 +++- docs/docs/setup/select-model.md | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/config/types.ts b/core/config/types.ts index f7bd0fc19..846bd19ef 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -562,6 +562,7 @@ declare global { // Gemini | "gemini-pro" | "gemini-1.5-pro-latest" + | "gemini-1.5-flash-latest" // Mistral | "mistral-tiny" | "mistral-small" diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index bb110676e..4eec46dad 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -94,7 +94,6 @@ const PARALLEL_PROVIDERS: ModelProvider[] = [ "bedrock", "deepinfra", "gemini", - "gemini", "huggingface-inference-api", "huggingface-tgi", "mistral", diff --git a/docs/docs/reference/Model Providers/geminiapi.md b/docs/docs/reference/Model Providers/geminiapi.md index abbec270c..2971eba6f 100644 --- a/docs/docs/reference/Model Providers/geminiapi.md +++ b/docs/docs/reference/Model Providers/geminiapi.md @@ -1,6 +1,6 @@ # Gemini API -The Google Gemini API is currently in beta. You can [create an API key in Google AI Studio](https://aistudio.google.com) and use `gemini-1.5-pro-latest`. Change `~/.continue/config.json` to look like this: +The Google Gemini API is currently in beta. You can [create an API key in Google AI Studio](https://aistudio.google.com) and use `gemini-1.5-pro-latest`. Change `~/.continue/config.json` to include the following entry in the "models" array: ```json title="~/.continue/config.json" { @@ -15,4 +15,6 @@ The Google Gemini API is currently in beta. You can [create an API key in Google } ``` +Google has also released a more lightweight version of the model that still has a one-million-token context window and multimodal capabilities named Gemini Flash. It can be accessed by adding an entry in the models array similar to the above, but substituting "flash" for "pro" in the `title` and `model` values. + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Gemini.ts) diff --git a/docs/docs/setup/select-model.md b/docs/docs/setup/select-model.md index 462e70c4f..4ffb843f9 100644 --- a/docs/docs/setup/select-model.md +++ b/docs/docs/setup/select-model.md @@ -43,7 +43,7 @@ _You can also use other open-source chat models by adding them to your `config.j #### Gemini Pro from Google - Unlimited budget: `gemini-pro-1.5-latest` -- Limited budget: `gemini-pro-1.0` +- Limited budget: `gemini-flash-1.5-latest` or `gemini-pro-1.0` _You can also use other commercial chat models by adding them to your `config.json`._