From 34e140a41deca053aba2177cc57b1e4e7ead6eb1 Mon Sep 17 00:00:00 2001 From: 0xideas Date: Mon, 18 Nov 2024 17:38:54 +0100 Subject: [PATCH] Switch to gpt-4o-mini by default (#233) * Switch to gpt-4o-mini by default * Add option and make gpt-4o-mini default in frontend * Run llama index notebook without extra arguments in poetry install * Install extras for llama_index_notebook run --- .github/workflows/test_cognee_llama_index_notebook.yml | 2 +- cognee-frontend/src/ui/Partials/SettingsModal/Settings.tsx | 4 ++-- cognee/infrastructure/llm/config.py | 2 +- cognee/modules/settings/get_settings.py | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_cognee_llama_index_notebook.yml b/.github/workflows/test_cognee_llama_index_notebook.yml index c46d0de0d..860eec92b 100644 --- a/.github/workflows/test_cognee_llama_index_notebook.yml +++ b/.github/workflows/test_cognee_llama_index_notebook.yml @@ -46,7 +46,7 @@ jobs: - name: Install dependencies run: | - poetry install --no-interaction --all-extras --no-root + poetry install --no-interaction --all-extras poetry add jupyter --no-interaction - name: Execute Jupyter Notebook diff --git a/cognee-frontend/src/ui/Partials/SettingsModal/Settings.tsx b/cognee-frontend/src/ui/Partials/SettingsModal/Settings.tsx index 9d0744323..08574bd6b 100644 --- a/cognee-frontend/src/ui/Partials/SettingsModal/Settings.tsx +++ b/cognee-frontend/src/ui/Partials/SettingsModal/Settings.tsx @@ -30,8 +30,8 @@ const defaultProvider = { }; const defaultModel = { - label: 'gpt-4o', - value: 'gpt-4o', + label: 'gpt-4o-mini', + value: 'gpt-4o-mini', }; export default function Settings({ onDone = () => {}, submitButtonText = 'Save' }) { diff --git a/cognee/infrastructure/llm/config.py b/cognee/infrastructure/llm/config.py index a30fa75c7..37541adf2 100644 --- a/cognee/infrastructure/llm/config.py +++ b/cognee/infrastructure/llm/config.py @@ -4,7 +4,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict class LLMConfig(BaseSettings): llm_provider: str = "openai" - llm_model: str = "gpt-4o" + llm_model: str = "gpt-4o-mini" llm_endpoint: str = "" llm_api_key: Optional[str] = None llm_temperature: float = 0.0 diff --git a/cognee/modules/settings/get_settings.py b/cognee/modules/settings/get_settings.py index 95f2f5924..b67b9d6ab 100644 --- a/cognee/modules/settings/get_settings.py +++ b/cognee/modules/settings/get_settings.py @@ -73,6 +73,9 @@ def get_settings() -> SettingsDict: "providers": llm_providers, "models": { "openai": [{ + "value": "gpt-4o-mini", + "label": "gpt-4o-mini", + }, { "value": "gpt-4o", "label": "gpt-4o", }, {