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.

minor

LearningCircuit01e0023dfa31
diff --git a/src/local_deep_research/config.py b/src/local_deep_research/config.py
index c822f11b6e..e5e7acc8c2 100644
--- a/src/local_deep_research/config.py
+++ b/src/local_deep_research/config.py
@@ -45,7 +45,7 @@ from langchain_ollama import ChatOllama
from langchain_community.llms import VLLM # Added VLLM import
from dotenv import load_dotenv
from .utilties.enums import KnowledgeAccumulationApproach
-
+import json
import os
import re
from typing import Dict, List, Any, Optional, Callable
@@ -260,3 +260,32 @@ def get_search():
print(f"Failed to create search engine with tool: {search_tool}")
return engine
+USER_CONFIG_PATH = os.path.expanduser("~/.local_deep_research/config.json")
+
+def get_config():
+ """Get current configuration as dictionary"""
+ config_dict = {}
+ # Get all uppercase variables (conventional config variables)
+ for key, value in globals().items():
+ if key.isupper() and not key.startswith('_'):
+ config_dict[key] = value
+ return config_dict
+
+def save_config(config_dict):
+ """Save user configuration"""
+ os.makedirs(os.path.dirname(USER_CONFIG_PATH), exist_ok=True)
+ with open(USER_CONFIG_PATH, 'w') as f:
+ json.dump(config_dict, f, indent=2)
+
+# Load user config at module import time
+if os.path.exists(USER_CONFIG_PATH):
+ try:
+ with open(USER_CONFIG_PATH, 'r') as f:
+ user_config = json.load(f)
+ # Update globals with user settings
+ for key, value in user_config.items():
+ if key in globals() and key.isupper():
+ globals()[key] = value
+ print(f"Loaded user configuration from {USER_CONFIG_PATH}")
+ except Exception as e:
+ print(f"Error loading user config: {e}")
\ No newline at end of file