~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
Merge branch 'main' into dev
Daniel Petti73c0da56bb0f
diff --cc src/local_deep_research/api/research_functions.pyindex 61646a226c,991f8b2fbb..b5421e2181--- a/src/local_deep_research/api/research_functions.py+++ b/src/local_deep_research/api/research_functions.py@@@ -4,11 -4,14 +4,11 @@@ Provides programmatic access to search"""import logging-import osfrom typing import Any, Callable, Dict, Optional- from .. import get_report_generator # Use the lazy import function-import toml-from ..config.llm_config import get_llmfrom ..config.search_config import get_search+ from ..report_generator import IntegratedReportGeneratorfrom ..search_system import AdvancedSearchSystemfrom ..utilities.search_utilities import remove_think_tagsdiff --cc src/local_deep_research/citation_handler.pyindex 02ad8cc501,3ee19abf3a..fea816ffe5--- a/src/local_deep_research/citation_handler.py+++ b/src/local_deep_research/citation_handler.py@@@ -81,19 -82,21 +81,19 @@@ Provide a detailed analysis with citatiformatted_sources = self._format_sources(documents)# Add fact-checking stepfact_check_prompt = f"""Analyze these sources for factual consistency:- 1. Cross-reference major claims between sources- 2. Identify and flag any contradictions- 3. Verify basic facts (dates, company names, ownership)- 4. Note when sources disagree+ 1. Cross-reference major claims between sources+ 2. Identify and flag any contradictions+ 3. Verify basic facts (dates, company names, ownership)+ 4. Note when sources disagree- Previous Knowledge:- {previous_knowledge}+ Previous Knowledge:+ {previous_knowledge}- New Sources:- {formatted_sources}+ New Sources:+ {formatted_sources}-Return any inconsistencies or conflicts found."""- if get_db_setting(- "general.enable_fact_checking", settings.general.enable_fact_checking- ):+ Return any inconsistencies or conflicts found."""+ if get_db_setting("general.enable_fact_checking", True):fact_check_response = self.llm.invoke(fact_check_prompt).contentelse:diff --cc src/local_deep_research/config/llm_config.pyindex 39cb00388c,4e85f85fad..3518377f89--- a/src/local_deep_research/config/llm_config.py+++ b/src/local_deep_research/config/llm_config.py@@@ -122,9 -131,9 +122,9 @@@ def get_llm(model_name=None, temperaturreturn get_fallback_model(temperature)# Get endpoint URL from settings- if openai_endpoint_url is not None:+ if openai_endpoint_url is None:openai_endpoint_url = get_db_setting(- "llm.openai_endpoint_url", settings.llm.openai_endpoint_url+ "llm.openai_endpoint.url", "https://openrouter.ai/api/v1")llm = ChatOpenAI(diff --cc src/local_deep_research/search_system.pyindex 52ffd4bab9,02b875fc29..e29c5701ce--- a/src/local_deep_research/search_system.py+++ b/src/local_deep_research/search_system.py@@@ -13,8 -13,12 +13,11 @@@ from .advanced_search_system.strategiesParallelSearchStrategy,)from .advanced_search_system.strategies.rapid_search_strategy import RapidSearchStrategy+ from .advanced_search_system.strategies.source_based_strategy import (+ SourceBasedSearchStrategy,+ )from .advanced_search_system.strategies.standard_strategy import StandardSearchStrategyfrom .citation_handler import CitationHandler-from .config.config_files import settingsfrom .config.llm_config import get_llmfrom .config.search_config import get_searchfrom .utilities.db_utils import get_db_setting@@@ -47,10 -55,14 +54,12 @@@ class AdvancedSearchSystemself.model = llmif llm is None:self.model = get_llm()+ self.search = search+ if search is None:+ self.search = get_search(llm_instance=self.model)- self.max_iterations = get_db_setting(- "search.iterations", settings.search.iterations- )+ self.max_iterations = get_db_setting("search.iterations", 1)self.questions_per_iteration = get_db_setting(- "search.questions_per_iteration", settings.search.questions_per_iteration+ "search.questions_per_iteration", 3)# Log the strategy name that's being used