~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
Fix code style issues
LearningCircuit2a1f16eff898
diff --git a/examples/optimization/run_gemini_benchmark.py b/examples/optimization/run_gemini_benchmark.pyindex 1da74f3bbc..421fcfc472 100755--- a/examples/optimization/run_gemini_benchmark.py+++ b/examples/optimization/run_gemini_benchmark.py@@ -70,7 +70,7 @@ def setup_gemini_config(api_key: Optional[str] = None) -> Dict[str, Any]:update_db_setting("llm.openai_endpoint.api_key", config["api_key"])# Log configuration- logger.info(f"LLM configuration updated to use Gemini Flash via OpenRouter")+ logger.info("LLM configuration updated to use Gemini Flash via OpenRouter")logger.info(f"Model: {config['model_name']}")logger.info(f"Provider: {config['provider']}")diff --git a/examples/optimization/update_llm_config.py b/examples/optimization/update_llm_config.pyindex a3ffd155e9..aceea76418 100755--- a/examples/optimization/update_llm_config.py+++ b/examples/optimization/update_llm_config.py@@ -115,17 +115,17 @@ def update_llm_configuration(if api_key:update_db_setting("llm.openai_endpoint.api_key", api_key)- logger.info(f"Updated llm.openai_endpoint.api_key (value hidden)")+ logger.info("Updated llm.openai_endpoint.api_key (value hidden)")elif provider == "openai":if api_key:update_db_setting("llm.openai.api_key", api_key)- logger.info(f"Updated llm.openai.api_key (value hidden)")+ logger.info("Updated llm.openai.api_key (value hidden)")elif provider == "anthropic":if api_key:update_db_setting("llm.anthropic.api_key", api_key)- logger.info(f"Updated llm.anthropic.api_key (value hidden)")+ logger.info("Updated llm.anthropic.api_key (value hidden)")# Verify settings were updatedcurrent_model = get_db_setting("llm.model")diff --git a/src/local_deep_research/benchmarks/datasets/__init__.py b/src/local_deep_research/benchmarks/datasets/__init__.pyindex b6ad74e4fd..1e15f3b6ec 100644--- a/src/local_deep_research/benchmarks/datasets/__init__.py+++ b/src/local_deep_research/benchmarks/datasets/__init__.py@@ -1,13 +1,13 @@"""Dataset handling for benchmarks.-This module provides functions and classes for loading and processing+This module provides functions and classes for loading and processingbenchmark datasets in a maintainable, extensible way."""from .base import BenchmarkDataset, DatasetRegistry-from .simpleqa import SimpleQADatasetfrom .browsecomp import BrowseCompDataset+from .simpleqa import SimpleQADataset# Register datasetsDatasetRegistry.register(SimpleQADataset)@@ -19,10 +19,12 @@ DEFAULT_DATASET_URLS = {"browsecomp": BrowseCompDataset.get_default_dataset_path(),}+def get_available_datasets():"""Get information about all registered datasets."""return DatasetRegistry.get_available_datasets()+def load_dataset(dataset_type,dataset_path=None,@@ -30,16 +32,16 @@ def load_dataset(seed=42,):"""Load a dataset by name.-+This is a backwards-compatible function that uses the new dataset classesunder the hood. It exists to maintain compatibility with existing code.-+Args:dataset_type: Type of dataset ('simpleqa' or 'browsecomp')dataset_path: Path or URL to dataset (if None, uses default URL)num_examples: Optional number of examples to sampleseed: Random seed for sampling-+Returns:List of processed examples"""@@ -48,4 +50,4 @@ def load_dataset(dataset_path=dataset_path,num_examples=num_examples,seed=seed,- )\ No newline at end of file+ )diff --git a/src/local_deep_research/benchmarks/metrics/__init__.py b/src/local_deep_research/benchmarks/metrics/__init__.pyindex 2db518e78c..4b9f0edc2e 100644--- a/src/local_deep_research/benchmarks/metrics/__init__.py+++ b/src/local_deep_research/benchmarks/metrics/__init__.py@@ -1,24 +1,24 @@"""Unified metrics module for benchmark evaluation and optimization.-This package provides metrics calculation, reporting, and visualization+This package provides metrics calculation, reporting, and visualizationfunctionality for both regular benchmarks and parameter optimization."""from .calculation import (+ calculate_combined_score,calculate_metrics,calculate_quality_metrics,- calculate_speed_metrics,calculate_resource_metrics,- calculate_combined_score,+ calculate_speed_metrics,)from .reporting import generate_report__all__ = ["calculate_metrics",- "calculate_quality_metrics",+ "calculate_quality_metrics","calculate_speed_metrics","calculate_resource_metrics","calculate_combined_score","generate_report",-]\ No newline at end of file+]diff --git a/src/local_deep_research/benchmarks/optimization/api.py b/src/local_deep_research/benchmarks/optimization/api.pyindex 4bf36caed6..eaa724a9df 100644--- a/src/local_deep_research/benchmarks/optimization/api.py+++ b/src/local_deep_research/benchmarks/optimization/api.py@@ -9,12 +9,7 @@ import loggingimport osfrom typing import Any, Callable, Dict, List, Optional, Tuple-from ..metrics import (- calculate_combined_score,- calculate_quality_metrics,- calculate_resource_metrics,- calculate_speed_metrics,-)+# No metrics imports needed here, they're used in the OptunaOptimizerfrom .optuna_optimizer import OptunaOptimizerlogger = logging.getLogger(__name__)