Skip to content

Commit

Permalink
🔄 synced local 'skyvern/' with remote 'skyvern/'
Browse files Browse the repository at this point in the history
<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add Gemini 2.0 flash configurations to `LLMConfigRegistry` in `config_registry.py`, conditional on `ENABLE_GEMINI`.
>
>   - **Configurations**:
>     - Add `GEMINI_FLASH_2_0` and `GEMINI_FLASH_2_0_LITE` to `LLMConfigRegistry` in `config_registry.py`.
>     - Both configurations support vision, do not add assistant prefix, and have a max of 8192 completion tokens.
>   - **Conditions**:
>     - Configurations are registered only if `settings.ENABLE_GEMINI` is true.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for 4e494139c64784774413f17274949a5feb1c2e4b. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
wintonzheng committed Feb 7, 2025
1 parent f9296ba commit ded4688
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions skyvern/forge/sdk/api/llm/config_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,26 @@ def get_config(cls, llm_key: str) -> LLMRouterConfig | LLMConfig:
)

if settings.ENABLE_GEMINI:
LLMConfigRegistry.register_config(
"GEMINI_FLASH_2_0",
LLMConfig(
"gemini/gemini-2.0-flash-001",
["GEMINI_API_KEY"],
supports_vision=True,
add_assistant_prefix=False,
max_completion_tokens=8192,
),
)
LLMConfigRegistry.register_config(
"GEMINI_FLASH_2_0_LITE",
LLMConfig(
"gemini/gemini-2.0-flash-lite-preview-02-05",
["GEMINI_API_KEY"],
supports_vision=True,
add_assistant_prefix=False,
max_completion_tokens=8192,
),
)
LLMConfigRegistry.register_config(
"GEMINI_PRO",
LLMConfig(
Expand Down

0 comments on commit ded4688

Please sign in to comment.