From 092c06580911a6e236fbf32cb2840e89e61b656c Mon Sep 17 00:00:00 2001 From: vikingowl Date: Wed, 6 Aug 2025 18:13:50 +0200 Subject: [PATCH] expanded example.env with new LLM model, increased MAX_ARTICLE_LENGTH, updated context size, and extended .gitignore entries --- .gitignore | 3 +++ backend/app/config.py | 2 +- backend/app/services.py | 2 +- backend/example.env | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 38a73d0..8cb4568 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ htmlcov/ !.yarn/versions backend-rust/owlynews.sqlite3 backend-rust/target +/backend-rust/config.toml +/backend-rust/owlynews.sqlite3-shm +/backend-rust/owlynews.sqlite3-wal diff --git a/backend/app/config.py b/backend/app/config.py index a5730f8..c79a5d9 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -12,7 +12,7 @@ LLM_MODEL = os.getenv("LLM_MODEL", "mistral-nemo:12b") LLM_TIMEOUT_SECONDS = int(os.getenv("LLM_TIMEOUT_SECONDS", 180)) OLLAMA_API_TIMEOUT_SECONDS = int(os.getenv("OLLAMA_API_TIMEOUT_SECONDS", 10)) ARTICLE_FETCH_TIMEOUT = int(os.getenv("ARTICLE_FETCH_TIMEOUT", 30)) -MAX_ARTICLE_LENGTH = int(os.getenv("MAX_ARTICLE_LENGTH", 5000)) +MAX_ARTICLE_LENGTH = int(os.getenv("MAX_ARTICLE_LENGTH", 10_000)) frontend_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), diff --git a/backend/app/services.py b/backend/app/services.py index 2cea636..7fa75e5 100644 --- a/backend/app/services.py +++ b/backend/app/services.py @@ -209,7 +209,7 @@ class NewsFetcher: "format": "json", "options": { "num_gpu": 1, # Force GPU usage - "num_ctx": 8192, # Context size + "num_ctx": 128_000, # Context size } } diff --git a/backend/example.env b/backend/example.env index 56a74f9..4b9fe24 100644 --- a/backend/example.env +++ b/backend/example.env @@ -14,6 +14,7 @@ SYNC_COOLDOWN_MINUTES=30 LLM_MODEL=qwen2:7b-instruct-q4_K_M LLM_MODEL=phi3:3.8b-mini-128k-instruct-q4_0 LLM_MODEL=mistral-nemo:12b +LLM_MODEL=cnjack/mistral-samll-3.1:24b-it-q4_K_S # Timeout in seconds for LLM requests LLM_TIMEOUT_SECONDS=180