Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

Merge pull request #370 from LearningCircuit/dev

LearningCircuit234d2afa7da0
diff --cc src/local_deep_research/config/llm_config.py
index 11cc86917e,fdf2a3a545..ff10927fce
--- a/src/local_deep_research/config/llm_config.py
+++ b/src/local_deep_research/config/llm_config.py
@@@ -9,11 -9,7 +9,8 @@@ from loguru import logge
from ..utilities.db_utils import get_db_setting
from ..utilities.search_utilities import remove_think_tags
+from ..utilities.url_utils import normalize_url
- # Setup logging
- logger = logging.getLogger(__name__)
-
# Valid provider options
VALID_PROVIDERS = [
"ollama",
diff --cc src/local_deep_research/web/routes/settings_routes.py
index faae4b0cfe,41c9523638..05a51e534d
--- a/src/local_deep_research/web/routes/settings_routes.py
+++ b/src/local_deep_research/web/routes/settings_routes.py
@@@ -665,21 -661,12 +662,20 @@@ def api_get_available_models()
# Try to query the Ollama API directly
try:
- current_app.logger.info("Attempting to connect to Ollama API")
+ logger.info("Attempting to connect to Ollama API")
- base_url = get_db_setting("llm.ollama.url", "http://localhost:11434")
+ raw_base_url = get_db_setting(
+ "llm.ollama.url", "http://localhost:11434"
+ )
+ base_url = (
+ normalize_url(raw_base_url)
+ if raw_base_url
+ else "http://localhost:11434"
+ )
+
ollama_response = requests.get(f"{base_url}/api/tags", timeout=5)
- current_app.logger.debug(
+ logger.debug(
f"Ollama API response: Status {ollama_response.status_code}"
)
diff --cc src/local_deep_research/web_search_engines/engines/search_engine_local.py
index 7f6df0dc11,aa3b46e0bf..d5739f7cea
--- a/src/local_deep_research/web_search_engines/engines/search_engine_local.py
+++ b/src/local_deep_research/web_search_engines/engines/search_engine_local.py
@@@ -32,13 -32,8 +32,9 @@@ from loguru import logge
from ...config import search_config
from ...utilities.db_utils import get_db_setting
+from ...utilities.url_utils import normalize_url
from ..search_engine_base import BaseSearchEngine
- # Setup logging
- logging.basicConfig(level=logging.INFO)
- logger = logging.getLogger(__name__)
-
def _get_file_loader(file_path: str) -> Optional[BaseLoader]:
"""Get an appropriate document loader for a file based on its extension"""
@@@ -572,10 -559,10 +568,10 @@@ class LocalEmbeddingManager
str(index_path),
self.embeddings,
allow_dangerous_deserialization=True,
- nomalize_L2=True,
+ normalize_L2=True,
)
- except Exception as e:
- logger.error(f"Error loading index for {folder_path}: {e}")
+ except Exception:
+ logger.exception(f"Error loading index for {folder_path}")
continue
# Search in this folder