From 5712e6e07981284d6d4bc60c9a980a54acd37853 Mon Sep 17 00:00:00 2001 From: holchan <61059652+holchan@users.noreply.github.com> Date: Thu, 9 Jan 2025 22:58:30 -0300 Subject: [PATCH] add_gemini_frontend --- cognee/api/v1/settings/routers/get_settings_router.py | 2 +- cognee/modules/settings/get_settings.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cognee/api/v1/settings/routers/get_settings_router.py b/cognee/api/v1/settings/routers/get_settings_router.py index 138bea661..e2842e3cd 100644 --- a/cognee/api/v1/settings/routers/get_settings_router.py +++ b/cognee/api/v1/settings/routers/get_settings_router.py @@ -21,7 +21,7 @@ class SettingsDTO(OutDTO): class LLMConfigInputDTO(InDTO): - provider: Union[Literal["openai"], Literal["ollama"], Literal["anthropic"]] + provider: Union[Literal["openai"], Literal["ollama"], Literal["anthropic"], Literal["gemini"]] model: str api_key: str diff --git a/cognee/modules/settings/get_settings.py b/cognee/modules/settings/get_settings.py index 93fd67cff..063c18971 100644 --- a/cognee/modules/settings/get_settings.py +++ b/cognee/modules/settings/get_settings.py @@ -13,6 +13,7 @@ class ModelName(Enum): openai = "openai" ollama = "ollama" anthropic = "anthropic" + gemini = "gemini" class LLMConfig(BaseModel): @@ -72,6 +73,10 @@ def get_settings() -> SettingsDict: "value": "anthropic", "label": "Anthropic", }, + { + "value": "gemini", + "label": "Gemini", + }, ] return SettingsDict.model_validate( @@ -136,6 +141,12 @@ def get_settings() -> SettingsDict: "label": "Claude 3 Haiku", }, ], + "gemini": [ + { + "value": "gemini-2.0-flash-exp", + "label": "Gemini 2.0 Flash", + }, + ], }, }, vector_db={