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.

Load all the settings from the database.

Daniel Petti01a54dba1e31
diff --git a/src/local_deep_research/defaults/default_settings.json b/src/local_deep_research/defaults/default_settings.json
new file mode 100644
index 0000000000..14e272598e
--- /dev/null
+++ b/src/local_deep_research/defaults/default_settings.json
@@ -0,0 +1,3381 @@
+{
+ "app.debug": {
+ "category": "app_interface",
+ "description": "Enable debug mode for the web application",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Debug Mode",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "app.enable_notifications": {
+ "category": "app_interface",
+ "description": "Enable browser notifications for research events",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Enable Notifications",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "app.enable_web": {
+ "category": "app_interface",
+ "description": "Enable the web server",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Enable Web Server",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "app.host": {
+ "category": "app_interface",
+ "description": "Host address to bind the web server",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Web Host",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "text",
+ "value": "0.0.0.0",
+ "visible": true
+ },
+ "app.port": {
+ "category": "app_interface",
+ "description": "Port for the web server",
+ "editable": true,
+ "max_value": 65535.0,
+ "min_value": 1.0,
+ "name": "Web Port",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "number",
+ "value": 5000,
+ "visible": true
+ },
+ "app.theme": {
+ "category": "app_interface",
+ "description": "User interface theme",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "UI Theme",
+ "options": [
+ {
+ "label": "Dark",
+ "value": "dark"
+ },
+ {
+ "label": "Light",
+ "value": "light"
+ },
+ {
+ "label": "System Default",
+ "value": "system"
+ }
+ ],
+ "step": null,
+ "type": "APP",
+ "ui_element": "select",
+ "value": "dark",
+ "visible": true
+ },
+ "app.web_interface": {
+ "category": "app_interface",
+ "description": "Enable the web interface",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Web Interface",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "arxiv.class_name": {
+ "category": null,
+ "description": "Setting for arxiv.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "ArXivSearchEngine",
+ "visible": true
+ },
+ "arxiv.default_params.max_results": {
+ "category": null,
+ "description": "Setting for arxiv.default_params.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 20,
+ "visible": true
+ },
+ "arxiv.default_params.sort_by": {
+ "category": null,
+ "description": "Setting for arxiv.default_params.sort_by",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Sort By",
+ "options": [
+ {
+ "label": "Relevance",
+ "value": "relevance"
+ },
+ {
+ "label": "Last Updated Date",
+ "value": "lastUpdatedDate"
+ },
+ {
+ "label": "Submitted Date",
+ "value": "submittedDate"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "relevance",
+ "visible": true
+ },
+ "arxiv.default_params.sort_order": {
+ "category": null,
+ "description": "Setting for arxiv.default_params.sort_order",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Sort Order",
+ "options": [
+ {
+ "label": "Ascending",
+ "value": "ascending"
+ },
+ {
+ "label": "Descending",
+ "value": "descending"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "descending",
+ "visible": true
+ },
+ "arxiv.module_path": {
+ "category": null,
+ "description": "Setting for arxiv.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_arxiv",
+ "visible": true
+ },
+ "arxiv.reliability": {
+ "category": null,
+ "description": "Setting for arxiv.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.9,
+ "visible": true
+ },
+ "arxiv.requires_api_key": {
+ "category": null,
+ "description": "Setting for arxiv.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "arxiv.strengths": {
+ "category": null,
+ "description": "Setting for arxiv.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "scientific papers",
+ "academic research",
+ "physics",
+ "computer science",
+ "mathematics",
+ "statistics",
+ "machine learning",
+ "preprints"
+ ],
+ "visible": true
+ },
+ "arxiv.weaknesses": {
+ "category": null,
+ "description": "Setting for arxiv.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "non-academic topics",
+ "consumer products",
+ "news",
+ "general information"
+ ],
+ "visible": true
+ },
+ "auto.class_name": {
+ "category": null,
+ "description": "Setting for auto.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "MetaSearchEngine",
+ "visible": true
+ },
+ "auto.default_params.max_engines_to_try": {
+ "category": null,
+ "description": "Setting for auto.default_params.max_engines_to_try",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Engines To Try",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 3,
+ "visible": true
+ },
+ "auto.default_params.use_api_key_services": {
+ "category": null,
+ "description": "Setting for auto.default_params.use_api_key_services",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Use Api Key Services",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "auto.module_path": {
+ "category": null,
+ "description": "Setting for auto.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.meta_search_engine",
+ "visible": true
+ },
+ "auto.reliability": {
+ "category": null,
+ "description": "Setting for auto.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.85,
+ "visible": true
+ },
+ "auto.requires_api_key": {
+ "category": null,
+ "description": "Setting for auto.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "auto.requires_llm": {
+ "category": null,
+ "description": "Setting for auto.requires_llm",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Llm",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "auto.strengths": {
+ "category": null,
+ "description": "Setting for auto.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "intelligent engine selection",
+ "adaptable to query type",
+ "fallback capabilities"
+ ],
+ "visible": true
+ },
+ "auto.weaknesses": {
+ "category": null,
+ "description": "Setting for auto.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "slightly slower due to LLM analysis"
+ ],
+ "visible": true
+ },
+ "brave.api_key_env": {
+ "category": null,
+ "description": "Setting for brave.api_key_env",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Api Key Env",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "BRAVE_API_KEY",
+ "visible": true
+ },
+ "brave.class_name": {
+ "category": null,
+ "description": "Setting for brave.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "BraveSearchEngine",
+ "visible": true
+ },
+ "brave.default_params.region": {
+ "category": null,
+ "description": "Setting for brave.default_params.region",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Region",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "US",
+ "visible": true
+ },
+ "brave.default_params.safe_search": {
+ "category": null,
+ "description": "Setting for brave.default_params.safe_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Safe Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "brave.default_params.search_language": {
+ "category": null,
+ "description": "Setting for brave.default_params.search_language",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Search Language",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "English",
+ "visible": true
+ },
+ "brave.default_params.time_period": {
+ "category": null,
+ "description": "Setting for brave.default_params.time_period",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Time Period",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "y",
+ "visible": true
+ },
+ "brave.full_search_class": {
+ "category": null,
+ "description": "Setting for brave.full_search_class",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Class",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "FullSearchResults",
+ "visible": true
+ },
+ "brave.full_search_module": {
+ "category": null,
+ "description": "Setting for brave.full_search_module",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Module",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "local_deep_research.web_search_engines.engines.full_search",
+ "visible": true
+ },
+ "brave.module_path": {
+ "category": null,
+ "description": "Setting for brave.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_brave",
+ "visible": true
+ },
+ "brave.reliability": {
+ "category": null,
+ "description": "Setting for brave.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.7,
+ "visible": true
+ },
+ "brave.requires_api_key": {
+ "category": null,
+ "description": "Setting for brave.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "brave.strengths": {
+ "category": null,
+ "description": "Setting for brave.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "privacy-focused web search",
+ "product information",
+ "reviews",
+ "recent content",
+ "news",
+ "broad coverage"
+ ],
+ "visible": true
+ },
+ "brave.supports_full_search": {
+ "category": null,
+ "description": "Setting for brave.supports_full_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Supports Full Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "brave.weaknesses": {
+ "category": null,
+ "description": "Setting for brave.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "requires API key with usage limits",
+ "smaller index than Google"
+ ],
+ "visible": true
+ },
+ "general.enable_fact_checking": {
+ "category": null,
+ "description": "Setting for general.enable_fact_checking",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Enable Fact Checking",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "text",
+ "value": false,
+ "visible": true
+ },
+ "general.knowledge_accumulation": {
+ "category": null,
+ "description": "Setting for general.knowledge_accumulation",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Knowledge Accumulation",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "text",
+ "value": "ITERATION",
+ "visible": true
+ },
+ "general.knowledge_accumulation_context_limit": {
+ "category": null,
+ "description": "Setting for general.knowledge_accumulation_context_limit",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Knowledge Accumulation Context Limit",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "text",
+ "value": 2000000,
+ "visible": true
+ },
+ "general.output_dir": {
+ "category": null,
+ "description": "Setting for general.output_dir",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Output Dir",
+ "options": null,
+ "step": null,
+ "type": "APP",
+ "ui_element": "text",
+ "value": "research_outputs",
+ "visible": true
+ },
+ "github.class_name": {
+ "category": null,
+ "description": "Setting for github.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "GitHubSearchEngine",
+ "visible": true
+ },
+ "github.default_params.include_issues": {
+ "category": null,
+ "description": "Setting for github.default_params.include_issues",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Include Issues",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "github.default_params.include_readme": {
+ "category": null,
+ "description": "Setting for github.default_params.include_readme",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Include Readme",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "github.default_params.max_results": {
+ "category": null,
+ "description": "Setting for github.default_params.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 15,
+ "visible": true
+ },
+ "github.default_params.search_type": {
+ "category": null,
+ "description": "Setting for github.default_params.search_type",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Search Type",
+ "options": [
+ {
+ "label": "Repositories",
+ "value": "repositories"
+ },
+ {
+ "label": "Code",
+ "value": "code"
+ },
+ {
+ "label": "Issues",
+ "value": "issues"
+ },
+ {
+ "label": "Users",
+ "value": "users"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "repositories",
+ "visible": true
+ },
+ "github.module_path": {
+ "category": null,
+ "description": "Setting for github.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_github",
+ "visible": true
+ },
+ "github.reliability": {
+ "category": null,
+ "description": "Setting for github.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.99,
+ "visible": true
+ },
+ "github.requires_api_key": {
+ "category": null,
+ "description": "Setting for github.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "github.strengths": {
+ "category": null,
+ "description": "Setting for github.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "code repositories",
+ "software documentation",
+ "open source projects",
+ "programming issues",
+ "developer information",
+ "technical documentation"
+ ],
+ "visible": true
+ },
+ "github.supports_full_search": {
+ "category": null,
+ "description": "Setting for github.supports_full_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Supports Full Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "github.weaknesses": {
+ "category": null,
+ "description": "Setting for github.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "non-technical content",
+ "content outside GitHub",
+ "rate limits without API key"
+ ],
+ "visible": true
+ },
+ "google_pse.api_key_env": {
+ "category": null,
+ "description": "Setting for google_pse.api_key_env",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Api Key Env",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "GOOGLE_PSE_API_KEY",
+ "visible": true
+ },
+ "google_pse.class_name": {
+ "category": null,
+ "description": "Setting for google_pse.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "GooglePSESearchEngine",
+ "visible": true
+ },
+ "google_pse.default_params.region": {
+ "category": null,
+ "description": "Setting for google_pse.default_params.region",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Region",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "us",
+ "visible": true
+ },
+ "google_pse.default_params.safe_search": {
+ "category": null,
+ "description": "Setting for google_pse.default_params.safe_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Safe Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "google_pse.default_params.search_language": {
+ "category": null,
+ "description": "Setting for google_pse.default_params.search_language",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Search Language",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "English",
+ "visible": true
+ },
+ "google_pse.full_search_class": {
+ "category": null,
+ "description": "Setting for google_pse.full_search_class",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Class",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "FullSearchResults",
+ "visible": true
+ },
+ "google_pse.full_search_module": {
+ "category": null,
+ "description": "Setting for google_pse.full_search_module",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Module",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.full_search",
+ "visible": true
+ },
+ "google_pse.module_path": {
+ "category": null,
+ "description": "Setting for google_pse.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_google_pse",
+ "visible": true
+ },
+ "google_pse.reliability": {
+ "category": null,
+ "description": "Setting for google_pse.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.9,
+ "visible": true
+ },
+ "google_pse.requires_api_key": {
+ "category": null,
+ "description": "Setting for google_pse.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "google_pse.strengths": {
+ "category": null,
+ "description": "Setting for google_pse.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "custom search scope",
+ "high-quality results",
+ "domain-specific search",
+ "configurable search experience",
+ "control over search index"
+ ],
+ "visible": true
+ },
+ "google_pse.supports_full_search": {
+ "category": null,
+ "description": "Setting for google_pse.supports_full_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Supports Full Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "google_pse.weaknesses": {
+ "category": null,
+ "description": "Setting for google_pse.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "requires API key with usage limits",
+ "limited to 10,000 queries/day on free tier",
+ "requires search engine configuration in Google Control Panel"
+ ],
+ "visible": true
+ },
+ "llm.llamacpp_f16_kv": {
+ "category": null,
+ "description": "Setting for llm.llamacpp_f16_kv",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Llamacpp F16 Kv",
+ "options": null,
+ "step": null,
+ "type": "LLM",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "llm.llamacpp_model_path": {
+ "category": null,
+ "description": "Setting for llm.llamacpp_model_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Llamacpp Model Path",
+ "options": null,
+ "step": null,
+ "type": "LLM",
+ "ui_element": "text",
+ "value": "",
+ "visible": true
+ },
+ "llm.llamacpp_n_batch": {
+ "category": null,
+ "description": "Setting for llm.llamacpp_n_batch",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Llamacpp N Batch",
+ "options": null,
+ "step": null,
+ "type": "LLM",
+ "ui_element": "number",
+ "value": 512,
+ "visible": true
+ },
+ "llm.llamacpp_n_gpu_layers": {
+ "category": null,
+ "description": "Setting for llm.llamacpp_n_gpu_layers",
+ "editable": true,
+ "max_value": null,
+ "min_value": 0,
+ "name": "Llamacpp N Gpu Layers",
+ "options": null,
+ "step": null,
+ "type": "LLM",
+ "ui_element": "number",
+ "value": 1,
+ "visible": true
+ },
+ "llm.lmstudio_url": {
+ "category": null,
+ "description": "Setting for llm.lmstudio_url",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Lmstudio Url",
+ "options": null,
+ "step": null,
+ "type": "LLM",
+ "ui_element": "text",
+ "value": "http://localhost:1234",
+ "visible": true
+ },
+ "llm.max_tokens": {
+ "category": "llm_parameters",
+ "description": "Maximum number of tokens in model responses",
+ "editable": true,
+ "max_value": 4096.0,
+ "min_value": 100.0,
+ "name": "Max Tokens",
+ "options": null,
+ "step": null,
+ "type": "LLM",
+ "ui_element": "number",
+ "value": 30000,
+ "visible": true
+ },
+ "llm.model": {
+ "category": "llm_general",
+ "description": "Language model to use for research and analysis",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "LLM Model",
+ "options": [
+ {
+ "label": "GPT-4o (OpenAI)",
+ "value": "gpt-4o"
+ },
+ {
+ "label": "GPT-3.5 Turbo (OpenAI)",
+ "value": "gpt-3.5-turbo"
+ },
+ {
+ "label": "Claude 3.5 Sonnet (Anthropic)",
+ "value": "claude-3-5-sonnet-latest"
+ },
+ {
+ "label": "Claude 3 Opus (Anthropic)",
+ "value": "claude-3-opus-20240229"
+ },
+ {
+ "label": "Llama 3 (Meta)",
+ "value": "llama3"
+ },
+ {
+ "label": "Mistral (Mistral AI)",
+ "value": "mistral"
+ },
+ {
+ "label": "Mixtral (Mistral AI)",
+ "value": "mixtral"
+ }
+ ],
+ "step": null,
+ "type": "LLM",
+ "ui_element": "select",
+ "value": "gemma3:12b",
+ "visible": true
+ },
+ "llm.openai_endpoint_url": {
+ "category": null,
+ "description": "Setting for llm.openai_endpoint_url",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Openai Endpoint Url",
+ "options": null,
+ "step": null,
+ "type": "LLM",
+ "ui_element": "text",
+ "value": "https://openrouter.ai/api/v1",
+ "visible": true
+ },
+ "llm.provider": {
+ "category": "llm_general",
+ "description": "Service provider for the language model",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "LLM Provider",
+ "options": [
+ {
+ "label": "OpenAI API",
+ "value": "openai"
+ },
+ {
+ "label": "Anthropic API",
+ "value": "anthropic"
+ },
+ {
+ "label": "Ollama (Local)",
+ "value": "ollama"
+ },
+ {
+ "label": "LM Studio (Local)",
+ "value": "lmstudio"
+ },
+ {
+ "label": "vLLM (Local)",
+ "value": "vllm"
+ },
+ {
+ "label": "Custom OpenAI-compatible API",
+ "value": "openai_endpoint"
+ }
+ ],
+ "step": null,
+ "type": "LLM",
+ "ui_element": "select",
+ "value": "OLLAMA",
+ "visible": true
+ },
+ "llm.temperature": {
+ "category": "llm_parameters",
+ "description": "Controls randomness in model outputs (0.0 - 1.0)",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Temperature",
+ "options": null,
+ "step": 0.05,
+ "type": "LLM",
+ "ui_element": "slider",
+ "value": 0.7,
+ "visible": true
+ },
+ "local_all.DEFAULT_SEARCH_ENGINE": {
+ "category": null,
+ "description": "Setting for local_all.DEFAULT_SEARCH_ENGINE",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Default Search Engine",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "wikipedia",
+ "visible": true
+ },
+ "local_all.class_name": {
+ "category": null,
+ "description": "Setting for local_all.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "LocalAllSearchEngine",
+ "visible": true
+ },
+ "local_all.module_path": {
+ "category": null,
+ "description": "Setting for local_all.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_local_all",
+ "visible": true
+ },
+ "local_all.reliability": {
+ "category": null,
+ "description": "Setting for local_all.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.85,
+ "visible": true
+ },
+ "local_all.requires_api_key": {
+ "category": null,
+ "description": "Setting for local_all.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "local_all.requires_llm": {
+ "category": null,
+ "description": "Setting for local_all.requires_llm",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Llm",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "local_all.strengths": {
+ "category": null,
+ "description": "Setting for local_all.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "searches all local collections",
+ "personal documents",
+ "offline access"
+ ],
+ "visible": true
+ },
+ "local_all.weaknesses": {
+ "category": null,
+ "description": "Setting for local_all.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "may return too many results",
+ "requires indexing"
+ ],
+ "visible": true
+ },
+ "personal_notes.cache_dir": {
+ "category": null,
+ "description": "Setting for personal_notes.cache_dir",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Cache Dir",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "__CACHE_DIR__/local_search/personal_notes",
+ "visible": true
+ },
+ "personal_notes.chunk_overlap": {
+ "category": null,
+ "description": "Setting for personal_notes.chunk_overlap",
+ "editable": true,
+ "max_value": null,
+ "min_value": 0,
+ "name": "Chunk Overlap",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 100,
+ "visible": true
+ },
+ "personal_notes.chunk_size": {
+ "category": null,
+ "description": "Setting for personal_notes.chunk_size",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Chunk Size",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 500,
+ "visible": true
+ },
+ "personal_notes.description": {
+ "category": null,
+ "description": "Setting for personal_notes.description",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Description",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "Personal notes and documents",
+ "visible": true
+ },
+ "personal_notes.embedding_device": {
+ "category": null,
+ "description": "Setting for personal_notes.embedding_device",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Device",
+ "options": [
+ {
+ "label": "CPU",
+ "value": "cpu"
+ },
+ {
+ "label": "CUDA",
+ "value": "cuda"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "cpu",
+ "visible": true
+ },
+ "personal_notes.embedding_model": {
+ "category": null,
+ "description": "Setting for personal_notes.embedding_model",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Model",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "all-MiniLM-L6-v2",
+ "visible": true
+ },
+ "personal_notes.embedding_model_type": {
+ "category": null,
+ "description": "Setting for personal_notes.embedding_model_type",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Model Type",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "sentence_transformers",
+ "visible": true
+ },
+ "personal_notes.enabled": {
+ "category": null,
+ "description": "Setting for personal_notes.enabled",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Enabled",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "personal_notes.max_filtered_results": {
+ "category": null,
+ "description": "Setting for personal_notes.max_filtered_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Max Filtered Results",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": 10,
+ "visible": true
+ },
+ "personal_notes.max_results": {
+ "category": null,
+ "description": "Setting for personal_notes.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 30,
+ "visible": true
+ },
+ "personal_notes.name": {
+ "category": null,
+ "description": "Setting for personal_notes.name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "Personal Notes",
+ "visible": true
+ },
+ "personal_notes.paths": {
+ "category": null,
+ "description": "Setting for personal_notes.paths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Paths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "@format ${DOCS_DIR}/personal_notes"
+ ],
+ "visible": true
+ },
+ "personal_notes.reliability": {
+ "category": null,
+ "description": "Setting for personal_notes.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.75,
+ "visible": true
+ },
+ "personal_notes.strengths": {
+ "category": null,
+ "description": "Setting for personal_notes.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "personal knowledge",
+ "notes",
+ "private documents"
+ ],
+ "visible": true
+ },
+ "personal_notes.weaknesses": {
+ "category": null,
+ "description": "Setting for personal_notes.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "subjective content",
+ "informal information"
+ ],
+ "visible": true
+ },
+ "project_docs.cache_dir": {
+ "category": null,
+ "description": "Setting for project_docs.cache_dir",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Cache Dir",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "__CACHE_DIR__/local_search/project_docs",
+ "visible": true
+ },
+ "project_docs.chunk_overlap": {
+ "category": null,
+ "description": "Setting for project_docs.chunk_overlap",
+ "editable": true,
+ "max_value": null,
+ "min_value": 0,
+ "name": "Chunk Overlap",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 200,
+ "visible": true
+ },
+ "project_docs.chunk_size": {
+ "category": null,
+ "description": "Setting for project_docs.chunk_size",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Chunk Size",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 1000,
+ "visible": true
+ },
+ "project_docs.description": {
+ "category": null,
+ "description": "Setting for project_docs.description",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Description",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "Project documentation and specifications",
+ "visible": true
+ },
+ "project_docs.embedding_device": {
+ "category": null,
+ "description": "Setting for project_docs.embedding_device",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Device",
+ "options": [
+ {
+ "label": "CPU",
+ "value": "cpu"
+ },
+ {
+ "label": "CUDA",
+ "value": "cuda"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "cpu",
+ "visible": true
+ },
+ "project_docs.embedding_model": {
+ "category": null,
+ "description": "Setting for project_docs.embedding_model",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Model",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "all-MiniLM-L6-v2",
+ "visible": true
+ },
+ "project_docs.embedding_model_type": {
+ "category": null,
+ "description": "Setting for project_docs.embedding_model_type",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Model Type",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "sentence_transformers",
+ "visible": true
+ },
+ "project_docs.enabled": {
+ "category": null,
+ "description": "Setting for project_docs.enabled",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Enabled",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "project_docs.max_filtered_results": {
+ "category": null,
+ "description": "Setting for project_docs.max_filtered_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Max Filtered Results",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": 5,
+ "visible": true
+ },
+ "project_docs.max_results": {
+ "category": null,
+ "description": "Setting for project_docs.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 20,
+ "visible": true
+ },
+ "project_docs.name": {
+ "category": null,
+ "description": "Setting for project_docs.name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "Project Documents",
+ "visible": true
+ },
+ "project_docs.paths": {
+ "category": null,
+ "description": "Setting for project_docs.paths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Paths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "@format ${DOCS_DIR}/project_documents"
+ ],
+ "visible": true
+ },
+ "project_docs.reliability": {
+ "category": null,
+ "description": "Setting for project_docs.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.9,
+ "visible": true
+ },
+ "project_docs.strengths": {
+ "category": null,
+ "description": "Setting for project_docs.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "project documentation",
+ "specifications",
+ "internal documents"
+ ],
+ "visible": true
+ },
+ "project_docs.weaknesses": {
+ "category": null,
+ "description": "Setting for project_docs.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "no external information",
+ "limited to organizational knowledge"
+ ],
+ "visible": true
+ },
+ "pubmed.api_key_env": {
+ "category": null,
+ "description": "Setting for pubmed.api_key_env",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Api Key Env",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "NCBI_API_KEY",
+ "visible": true
+ },
+ "pubmed.class_name": {
+ "category": null,
+ "description": "Setting for pubmed.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "PubMedSearchEngine",
+ "visible": true
+ },
+ "pubmed.default_params.days_limit": {
+ "category": null,
+ "description": "Setting for pubmed.default_params.days_limit",
+ "editable": true,
+ "max_value": null,
+ "min_value": 0,
+ "name": "Days Limit",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 0,
+ "visible": true
+ },
+ "pubmed.default_params.full_text_limit": {
+ "category": null,
+ "description": "Setting for pubmed.default_params.full_text_limit",
+ "editable": true,
+ "max_value": null,
+ "min_value": 0,
+ "name": "Full Text Limit",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 3,
+ "visible": true
+ },
+ "pubmed.default_params.get_abstracts": {
+ "category": null,
+ "description": "Setting for pubmed.default_params.get_abstracts",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Get Abstracts",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "pubmed.default_params.get_full_text": {
+ "category": null,
+ "description": "Setting for pubmed.default_params.get_full_text",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Get Full Text",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "pubmed.default_params.max_results": {
+ "category": null,
+ "description": "Setting for pubmed.default_params.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 20,
+ "visible": true
+ },
+ "pubmed.default_params.optimize_queries": {
+ "category": null,
+ "description": "Setting for pubmed.default_params.optimize_queries",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Optimize Queries",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "pubmed.module_path": {
+ "category": null,
+ "description": "Setting for pubmed.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_pubmed",
+ "visible": true
+ },
+ "pubmed.reliability": {
+ "category": null,
+ "description": "Setting for pubmed.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.98,
+ "visible": true
+ },
+ "pubmed.requires_api_key": {
+ "category": null,
+ "description": "Setting for pubmed.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "pubmed.requires_llm": {
+ "category": null,
+ "description": "Setting for pubmed.requires_llm",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Llm",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "pubmed.strengths": {
+ "category": null,
+ "description": "Setting for pubmed.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "biomedical literature",
+ "medical research",
+ "clinical studies",
+ "life sciences",
+ "health information",
+ "scientific papers"
+ ],
+ "visible": true
+ },
+ "pubmed.weaknesses": {
+ "category": null,
+ "description": "Setting for pubmed.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "non-medical topics",
+ "very recent papers may be missing",
+ "limited to published research"
+ ],
+ "visible": true
+ },
+ "report.detailed_citations": {
+ "category": "report_parameters",
+ "description": "Include detailed citations in reports",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Detailed Citations",
+ "options": null,
+ "step": null,
+ "type": "REPORT",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "report.enable_fact_checking": {
+ "category": "report_parameters",
+ "description": "Enable fact checking for report contents",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Enable Fact Checking",
+ "options": null,
+ "step": null,
+ "type": "REPORT",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "report.searches_per_section": {
+ "category": "report_parameters",
+ "description": "Number of searches to run per report section",
+ "editable": true,
+ "max_value": 5.0,
+ "min_value": 1.0,
+ "name": "Searches Per Section",
+ "options": null,
+ "step": null,
+ "type": "REPORT",
+ "ui_element": "number",
+ "value": 2,
+ "visible": true
+ },
+ "research_papers.cache_dir": {
+ "category": null,
+ "description": "Setting for research_papers.cache_dir",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Cache Dir",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "__CACHE_DIR__/local_search/research_papers",
+ "visible": true
+ },
+ "research_papers.chunk_overlap": {
+ "category": null,
+ "description": "Setting for research_papers.chunk_overlap",
+ "editable": true,
+ "max_value": null,
+ "min_value": 0,
+ "name": "Chunk Overlap",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 150,
+ "visible": true
+ },
+ "research_papers.chunk_size": {
+ "category": null,
+ "description": "Setting for research_papers.chunk_size",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Chunk Size",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 800,
+ "visible": true
+ },
+ "research_papers.description": {
+ "category": null,
+ "description": "Setting for research_papers.description",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Description",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "Academic research papers and articles",
+ "visible": true
+ },
+ "research_papers.embedding_device": {
+ "category": null,
+ "description": "Setting for research_papers.embedding_device",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Device",
+ "options": [
+ {
+ "label": "CPU",
+ "value": "cpu"
+ },
+ {
+ "label": "CUDA",
+ "value": "cuda"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "cpu",
+ "visible": true
+ },
+ "research_papers.embedding_model": {
+ "category": null,
+ "description": "Setting for research_papers.embedding_model",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Model",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "all-MiniLM-L6-v2",
+ "visible": true
+ },
+ "research_papers.embedding_model_type": {
+ "category": null,
+ "description": "Setting for research_papers.embedding_model_type",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Embedding Model Type",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "sentence_transformers",
+ "visible": true
+ },
+ "research_papers.enabled": {
+ "category": null,
+ "description": "Setting for research_papers.enabled",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Enabled",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "research_papers.max_filtered_results": {
+ "category": null,
+ "description": "Setting for research_papers.max_filtered_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Max Filtered Results",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": 5,
+ "visible": true
+ },
+ "research_papers.max_results": {
+ "category": null,
+ "description": "Setting for research_papers.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 20,
+ "visible": true
+ },
+ "research_papers.name": {
+ "category": null,
+ "description": "Setting for research_papers.name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "Research Papers",
+ "visible": true
+ },
+ "research_papers.paths": {
+ "category": null,
+ "description": "Setting for research_papers.paths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Paths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "@format ${DOCS_DIR}/research_papers"
+ ],
+ "visible": true
+ },
+ "research_papers.reliability": {
+ "category": null,
+ "description": "Setting for research_papers.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.85,
+ "visible": true
+ },
+ "research_papers.strengths": {
+ "category": null,
+ "description": "Setting for research_papers.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "academic research",
+ "scientific papers",
+ "scholarly content"
+ ],
+ "visible": true
+ },
+ "research_papers.weaknesses": {
+ "category": null,
+ "description": "Setting for research_papers.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "potentially outdated",
+ "limited to collected papers"
+ ],
+ "visible": true
+ },
+ "search.iterations": {
+ "category": null,
+ "description": "Setting for search.iterations",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Iterations",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 2,
+ "visible": true
+ },
+ "search.max_filtered_results": {
+ "category": null,
+ "description": "Setting for search.max_filtered_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Filtered Results",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 5,
+ "visible": true
+ },
+ "search.max_results": {
+ "category": "search_parameters",
+ "description": "Maximum number of search results to retrieve",
+ "editable": true,
+ "max_value": 50.0,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 50,
+ "visible": true
+ },
+ "search.quality_check_urls": {
+ "category": null,
+ "description": "Setting for search.quality_check_urls",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Quality Check Urls",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "search.questions_per_iteration": {
+ "category": "search_parameters",
+ "description": "Number of questions to generate per research cycle",
+ "editable": true,
+ "max_value": 10.0,
+ "min_value": 1.0,
+ "name": "Questions Per Iteration",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 2,
+ "visible": true
+ },
+ "search.region": {
+ "category": "search_parameters",
+ "description": "Geographic region for search results",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Search Region",
+ "options": [
+ {
+ "label": "United States",
+ "value": "us"
+ },
+ {
+ "label": "United Kingdom",
+ "value": "uk"
+ },
+ {
+ "label": "France",
+ "value": "fr"
+ },
+ {
+ "label": "Germany",
+ "value": "de"
+ },
+ {
+ "label": "Japan",
+ "value": "jp"
+ },
+ {
+ "label": "No Region (Worldwide)",
+ "value": "wt-wt"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "us",
+ "visible": true
+ },
+ "search.research_iterations": {
+ "category": "search_parameters",
+ "description": "Number of research cycles to perform",
+ "editable": true,
+ "max_value": 5.0,
+ "min_value": 1.0,
+ "name": "Research Iterations",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 2,
+ "visible": true
+ },
+ "search.safe_search": {
+ "category": "search_parameters",
+ "description": "Enable safe search filtering",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Safe Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "search.search_language": {
+ "category": "search_parameters",
+ "description": "Language for search results",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Search Language",
+ "options": [
+ {
+ "label": "English",
+ "value": "English"
+ },
+ {
+ "label": "French",
+ "value": "French"
+ },
+ {
+ "label": "German",
+ "value": "German"
+ },
+ {
+ "label": "Spanish",
+ "value": "Spanish"
+ },
+ {
+ "label": "Italian",
+ "value": "Italian"
+ },
+ {
+ "label": "Japanese",
+ "value": "Japanese"
+ },
+ {
+ "label": "Chinese",
+ "value": "Chinese"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "English",
+ "visible": true
+ },
+ "search.searches_per_section": {
+ "category": "search_parameters",
+ "description": "Number of searches to run per report section",
+ "editable": true,
+ "max_value": 5.0,
+ "min_value": 1.0,
+ "name": "Searches Per Section",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 2,
+ "visible": true
+ },
+ "search.skip_relevance_filter": {
+ "category": "search_parameters",
+ "description": "Skip filtering search results for relevance",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Skip Relevance Filter",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "search.snippets_only": {
+ "category": "search_parameters",
+ "description": "Only retrieve snippets instead of full search results",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Snippets Only",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "search.time_period": {
+ "category": "search_parameters",
+ "description": "Time period for search results",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Time Period",
+ "options": [
+ {
+ "label": "Past 24 hours",
+ "value": "d"
+ },
+ {
+ "label": "Past week",
+ "value": "w"
+ },
+ {
+ "label": "Past month",
+ "value": "m"
+ },
+ {
+ "label": "Past year",
+ "value": "y"
+ },
+ {
+ "label": "All time",
+ "value": "all"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "y",
+ "visible": true
+ },
+ "search.tool": {
+ "category": "search_general",
+ "description": "Web search engine to use for research",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Search Engine",
+ "options": [
+ {
+ "label": "Auto (Default)",
+ "value": "auto"
+ },
+ {
+ "label": "Arxiv",
+ "value": "arxiv"
+ },
+ {
+ "label": "Wikipedia",
+ "value": "wikipedia"
+ },
+ {
+ "label": "Pubmed",
+ "value": "pubmed"
+ },
+ {
+ "label": "Github",
+ "value": "github"
+ },
+ {
+ "label": "SerpAPI (Google)",
+ "value": "serpapi"
+ },
+ {
+ "label": "SearXNG (Self-hosted)",
+ "value": "searxng"
+ },
+ {
+ "label": "Google Programmable Search Engine",
+ "value": "google_pse"
+ },
+ {
+ "label": "DuckDuckGo",
+ "value": "duckduckgo"
+ },
+ {
+ "label": "Brave",
+ "value": "brave"
+ },
+ {
+ "label": "Wayback",
+ "value": "wayback"
+ },
+ {
+ "label": "Local All",
+ "value": "local_all"
+ }
+ ],
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "select",
+ "value": "auto",
+ "visible": true
+ },
+ "searxng.api_key_env": {
+ "category": null,
+ "description": "Setting for searxng.api_key_env",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Api Key Env",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "SEARXNG_INSTANCE",
+ "visible": true
+ },
+ "searxng.class_name": {
+ "category": null,
+ "description": "Setting for searxng.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "SearXNGSearchEngine",
+ "visible": true
+ },
+ "searxng.default_params.categories": {
+ "category": null,
+ "description": "Setting for searxng.default_params.categories",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Categories",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "general"
+ ],
+ "visible": true
+ },
+ "searxng.default_params.delay_between_requests": {
+ "category": null,
+ "description": "Setting for searxng.default_params.delay_between_requests",
+ "editable": true,
+ "max_value": null,
+ "min_value": 0,
+ "name": "Delay Between Requests",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 0,
+ "visible": true
+ },
+ "searxng.default_params.include_full_content": {
+ "category": null,
+ "description": "Setting for searxng.default_params.include_full_content",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Include Full Content",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "searxng.default_params.language": {
+ "category": null,
+ "description": "Setting for searxng.default_params.language",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Language",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "en",
+ "visible": true
+ },
+ "searxng.default_params.max_results": {
+ "category": null,
+ "description": "Setting for searxng.default_params.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 15,
+ "visible": true
+ },
+ "searxng.default_params.safe_search": {
+ "category": null,
+ "description": "Setting for searxng.default_params.safe_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Safe Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": 1,
+ "visible": true
+ },
+ "searxng.full_search_class": {
+ "category": null,
+ "description": "Setting for searxng.full_search_class",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Class",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "FullSearchResults",
+ "visible": true
+ },
+ "searxng.full_search_module": {
+ "category": null,
+ "description": "Setting for searxng.full_search_module",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Module",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.full_search",
+ "visible": true
+ },
+ "searxng.module_path": {
+ "category": null,
+ "description": "Setting for searxng.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_searxng",
+ "visible": true
+ },
+ "searxng.reliability": {
+ "category": null,
+ "description": "Setting for searxng.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.9,
+ "visible": true
+ },
+ "searxng.requires_api_key": {
+ "category": null,
+ "description": "Setting for searxng.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "searxng.strengths": {
+ "category": null,
+ "description": "Setting for searxng.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "privacy-focused",
+ "metasearch engine",
+ "self-hosted",
+ "no tracking",
+ "configurable",
+ "multiple engines in one"
+ ],
+ "visible": true
+ },
+ "searxng.supports_full_search": {
+ "category": null,
+ "description": "Setting for searxng.supports_full_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Supports Full Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "searxng.weaknesses": {
+ "category": null,
+ "description": "Setting for searxng.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "requires self-hosting",
+ "depends on other search engines",
+ "may be rate limited by underlying engines"
+ ],
+ "visible": true
+ },
+ "serpapi.api_key_env": {
+ "category": null,
+ "description": "Setting for serpapi.api_key_env",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Api Key Env",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "SERP_API_KEY",
+ "visible": true
+ },
+ "serpapi.class_name": {
+ "category": null,
+ "description": "Setting for serpapi.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "SerpAPISearchEngine",
+ "visible": true
+ },
+ "serpapi.default_params.region": {
+ "category": null,
+ "description": "Setting for serpapi.default_params.region",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Region",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "us",
+ "visible": true
+ },
+ "serpapi.default_params.safe_search": {
+ "category": null,
+ "description": "Setting for serpapi.default_params.safe_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Safe Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "serpapi.default_params.search_language": {
+ "category": null,
+ "description": "Setting for serpapi.default_params.search_language",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Search Language",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "English",
+ "visible": true
+ },
+ "serpapi.default_params.time_period": {
+ "category": null,
+ "description": "Setting for serpapi.default_params.time_period",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Time Period",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "y",
+ "visible": true
+ },
+ "serpapi.full_search_class": {
+ "category": null,
+ "description": "Setting for serpapi.full_search_class",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Class",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "FullSerpAPISearchResults",
+ "visible": true
+ },
+ "serpapi.full_search_module": {
+ "category": null,
+ "description": "Setting for serpapi.full_search_module",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Full Search Module",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "local_deep_research.web_search_engines.engines.full_serp_search_results_old",
+ "visible": true
+ },
+ "serpapi.module_path": {
+ "category": null,
+ "description": "Setting for serpapi.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_serpapi",
+ "visible": true
+ },
+ "serpapi.reliability": {
+ "category": null,
+ "description": "Setting for serpapi.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.6,
+ "visible": true
+ },
+ "serpapi.requires_api_key": {
+ "category": null,
+ "description": "Setting for serpapi.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "serpapi.strengths": {
+ "category": null,
+ "description": "Setting for serpapi.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "comprehensive web search",
+ "product information",
+ "reviews",
+ "recent content",
+ "news",
+ "broad coverage"
+ ],
+ "visible": true
+ },
+ "serpapi.supports_full_search": {
+ "category": null,
+ "description": "Setting for serpapi.supports_full_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Supports Full Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "serpapi.weaknesses": {
+ "category": null,
+ "description": "Setting for serpapi.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "requires API key with usage limits",
+ "not specialized for academic content"
+ ],
+ "visible": true
+ },
+ "wayback.class_name": {
+ "category": null,
+ "description": "Setting for wayback.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "WaybackSearchEngine",
+ "visible": true
+ },
+ "wayback.default_params.closest_only": {
+ "category": null,
+ "description": "Setting for wayback.default_params.closest_only",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Closest Only",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "wayback.default_params.language": {
+ "category": null,
+ "description": "Setting for wayback.default_params.language",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Language",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "English",
+ "visible": true
+ },
+ "wayback.default_params.max_results": {
+ "category": null,
+ "description": "Setting for wayback.default_params.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 15,
+ "visible": true
+ },
+ "wayback.default_params.max_snapshots_per_url": {
+ "category": null,
+ "description": "Setting for wayback.default_params.max_snapshots_per_url",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Snapshots Per Url",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 3,
+ "visible": true
+ },
+ "wayback.module_path": {
+ "category": null,
+ "description": "Setting for wayback.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_wayback",
+ "visible": true
+ },
+ "wayback.reliability": {
+ "category": null,
+ "description": "Setting for wayback.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.5,
+ "visible": true
+ },
+ "wayback.requires_api_key": {
+ "category": null,
+ "description": "Setting for wayback.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "wayback.strengths": {
+ "category": null,
+ "description": "Setting for wayback.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "historical web content",
+ "archived websites",
+ "content verification",
+ "deleted or changed web pages",
+ "website evolution tracking"
+ ],
+ "visible": true
+ },
+ "wayback.supports_full_search": {
+ "category": null,
+ "description": "Setting for wayback.supports_full_search",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Supports Full Search",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "wayback.weaknesses": {
+ "category": null,
+ "description": "Setting for wayback.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "limited to previously archived content",
+ "may miss recent changes",
+ "archiving quality varies"
+ ],
+ "visible": true
+ },
+ "web.debug": {
+ "category": null,
+ "description": "Setting for web.debug",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Debug",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": true,
+ "visible": true
+ },
+ "web.host": {
+ "category": null,
+ "description": "Setting for web.host",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Host",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "0.0.0.0",
+ "visible": true
+ },
+ "web.port": {
+ "category": null,
+ "description": "Setting for web.port",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Port",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": 5000,
+ "visible": true
+ },
+ "wikipedia.class_name": {
+ "category": null,
+ "description": "Setting for wikipedia.class_name",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Class Name",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": "WikipediaSearchEngine",
+ "visible": true
+ },
+ "wikipedia.default_params.include_content": {
+ "category": null,
+ "description": "Setting for wikipedia.default_params.include_content",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Include Content",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": true,
+ "visible": true
+ },
+ "wikipedia.default_params.max_results": {
+ "category": null,
+ "description": "Setting for wikipedia.default_params.max_results",
+ "editable": true,
+ "max_value": null,
+ "min_value": 1,
+ "name": "Max Results",
+ "options": null,
+ "step": 1,
+ "type": "SEARCH",
+ "ui_element": "number",
+ "value": 20,
+ "visible": true
+ },
+ "wikipedia.module_path": {
+ "category": null,
+ "description": "Setting for wikipedia.module_path",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Module Path",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": ".engines.search_engine_wikipedia",
+ "visible": true
+ },
+ "wikipedia.reliability": {
+ "category": null,
+ "description": "Setting for wikipedia.reliability",
+ "editable": true,
+ "max_value": 1.0,
+ "min_value": 0.0,
+ "name": "Reliability",
+ "options": null,
+ "step": 0.05,
+ "type": "SEARCH",
+ "ui_element": "range",
+ "value": 0.95,
+ "visible": true
+ },
+ "wikipedia.requires_api_key": {
+ "category": null,
+ "description": "Setting for wikipedia.requires_api_key",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Requires Api Key",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "checkbox",
+ "value": false,
+ "visible": true
+ },
+ "wikipedia.strengths": {
+ "category": null,
+ "description": "Setting for wikipedia.strengths",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Strengths",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "factual information",
+ "general knowledge",
+ "definitions",
+ "historical facts",
+ "biographies",
+ "overview information"
+ ],
+ "visible": true
+ },
+ "wikipedia.weaknesses": {
+ "category": null,
+ "description": "Setting for wikipedia.weaknesses",
+ "editable": true,
+ "max_value": null,
+ "min_value": null,
+ "name": "Weaknesses",
+ "options": null,
+ "step": null,
+ "type": "SEARCH",
+ "ui_element": "text",
+ "value": [
+ "recent events",
+ "specialized academic topics",
+ "product comparisons"
+ ],
+ "visible": true
+ }
+}
diff --git a/src/local_deep_research/web/database/migrations.py b/src/local_deep_research/web/database/migrations.py
index c353f9203f..40011df3f2 100644
--- a/src/local_deep_research/web/database/migrations.py
+++ b/src/local_deep_research/web/database/migrations.py
@@ -21,11 +21,8 @@ def migrate_settings_from_files(db_session):
# Create settings manager and import settings
try:
settings_mgr = SettingsManager(db_session)
- success = settings_mgr.import_from_file()
- if success:
- logger.info("Successfully imported settings from files")
- else:
- logger.warning("Failed to import some settings from files")
+ settings_mgr.load_from_defaults_file()
+ logger.info("Successfully imported settings from files")
except Exception as e:
logger.error("Error importing settings from files: %s", e)
else:
diff --git a/src/local_deep_research/web/routes/settings_routes.py b/src/local_deep_research/web/routes/settings_routes.py
index 991f4fd439..b0fb89e5bb 100644
--- a/src/local_deep_research/web/routes/settings_routes.py
+++ b/src/local_deep_research/web/routes/settings_routes.py
@@ -202,7 +202,6 @@ def save_all_settings():
original_values[key] = current_setting.value
# Determine setting type and category
- setting_type = None
if key.startswith("llm."):
setting_type = SettingType.LLM
category = "llm_general"
@@ -231,9 +230,8 @@ def save_all_settings():
setting_type = SettingType.APP
category = "app_interface"
else:
- # Skip keys without a known prefix
- logger.warning(f"Skipping setting with unknown type: {key}")
- continue
+ setting_type = None
+ category = None
# Special handling for corrupted or empty values
if value == "[object Object]" or (
@@ -425,121 +423,37 @@ def save_all_settings():
)
-@settings_bp.route("/reset_to_defaults", methods=["POST"])
+@settings_bp.route("/reset_to_defaults", methods=["GET"])
def reset_to_defaults():
"""Reset all settings to their default values"""
db_session = get_db_session()
+ # Import default settings from files
try:
- # First, delete all existing settings to ensure clean state
- try:
- # Get count before deletion
- settings_count = db_session.query(Setting).count()
- logger.info(f"Deleting {settings_count} existing settings before reset")
-
- # Delete all settings
- db_session.query(Setting).delete()
- db_session.commit()
- logger.info("Successfully deleted all existing settings")
- except Exception as e:
- logger.error(f"Error deleting existing settings: {e}")
- db_session.rollback()
- return (
- jsonify(
- {
- "status": "error",
- "message": f"Error cleaning existing settings: {str(e)}",
- }
- ),
- 500,
- )
-
- # Import default settings from files
- try:
- # Import default config files from the defaults directory
- from importlib.resources import files
-
- try:
- defaults_dir = files("local_deep_research.defaults")
- except ImportError:
- # Fallback for older Python versions
- from pkg_resources import resource_filename
-
- defaults_dir = Path(
- resource_filename("local_deep_research", "defaults")
- )
-
- logger.info(f"Loading defaults from: {defaults_dir}")
+ # Create settings manager for the temporary config
+ settings_mgr = get_settings_manager(db_session)
+ # Import settings from default files
+ settings_mgr.load_from_defaults_file()
- # Get temporary path to default files
- import tempfile
+ logger.info("Successfully imported settings from default files")
- with tempfile.TemporaryDirectory() as temp_dir:
- # Copy default files to temp directory
- temp_main = Path(temp_dir) / "settings.toml"
- temp_search = Path(temp_dir) / "search_engines.toml"
- temp_collections = Path(temp_dir) / "local_collections.toml"
-
- # Copy default files (platform independent)
- import importlib.resources as pkg_resources
-
- from ... import defaults
-
- with open(temp_main, "wb") as f:
- f.write(pkg_resources.read_binary(defaults, "main.toml"))
-
- with open(temp_search, "wb") as f:
- f.write(pkg_resources.read_binary(defaults, "search_engines.toml"))
-
- with open(temp_collections, "wb") as f:
- f.write(
- pkg_resources.read_binary(defaults, "local_collections.toml")
- )
-
- # Create settings manager with temp files
- # Get configuration directory (not used currently but might be needed in future)
- # config_dir = get_config_dir() / "config"
-
- # Create settings manager for the temporary config
- settings_mgr = get_settings_manager(db_session)
-
- # Import settings from default files
- settings_mgr.import_default_settings(
- temp_main, temp_search, temp_collections
- )
-
- logger.info("Successfully imported settings from default files")
- except Exception as e:
- logger.error(f"Error importing default settings: {e}")
-
- # Fallback to predefined settings if file import fails
- logger.info("Falling back to predefined settings")
- # Import here to avoid circular imports
- from ..database.migrations import (
- setup_predefined_settings as setup_settings,
- )
+ except Exception as e:
+ logger.error(f"Error importing default settings: {e}")
- setup_settings(db_session)
+ # Fallback to predefined settings if file import fails
+ logger.info("Falling back to predefined settings")
+ # Import here to avoid circular imports
+ from ..database.migrations import setup_predefined_settings as setup_settings
- # Return success
- return jsonify(
- {
- "status": "success",
- "message": "All settings have been reset to default values",
- }
- )
+ setup_settings(db_session)
- except Exception as e:
- logger.error(f"Error resetting settings to defaults: {e}")
- return (
- jsonify(
- {
- "status": "error",
- "message": f"Error resetting settings to defaults: {str(e)}",
- }
- ),
- 500,
- )
+ # Return success
+ return jsonify(
+ {
+ "status": "success",
+ "message": "All settings have been reset to default values",
+ }
+ )
@settings_bp.route("/all_settings", methods=["GET"])
@@ -555,7 +469,6 @@ def api_get_all_settings():
"""Get all settings"""
try:
# Get query parameters
- setting_type = request.args.get("type")
category = request.args.get("category")
# Create settings manager
@@ -563,14 +476,7 @@ def api_get_all_settings():
settings_manager = get_settings_manager(db_session)
# Get settings
- if setting_type:
- try:
- setting_type_enum = SettingType[setting_type.upper()]
- settings = settings_manager.get_all_settings(setting_type_enum)
- except KeyError:
- return jsonify({"error": f"Invalid setting type: {setting_type}"}), 400
- else:
- settings = settings_manager.get_all_settings()
+ settings = settings_manager.get_all_settings()
# Filter by category if requested
if category:
@@ -741,60 +647,14 @@ def api_delete_setting(key):
return jsonify({"error": str(e)}), 500
-@settings_bp.route("/api/export", methods=["POST"])
-def api_export_settings():
- """Export settings to file"""
- try:
- data = request.get_json() or {}
- setting_type_str = data.get("type")
-
- db_session = get_db_session()
- settings_manager = get_settings_manager(db_session)
-
- # Export settings
- if setting_type_str:
- try:
- setting_type = SettingType[setting_type_str.upper()]
- success = settings_manager.export_to_file(setting_type)
- except KeyError:
- return (
- jsonify({"error": f"Invalid setting type: {setting_type_str}"}),
- 400,
- )
- else:
- success = settings_manager.export_to_file()
-
- if success:
- return jsonify({"message": "Settings exported successfully"})
- else:
- return jsonify({"error": "Failed to export settings"}), 500
- except Exception as e:
- logger.error(f"Error exporting settings: {e}")
- return jsonify({"error": str(e)}), 500
-
-
@settings_bp.route("/api/import", methods=["POST"])
def api_import_settings():
- """Import settings from file"""
+ """Import settings from defaults file"""
try:
- data = request.get_json() or {}
- setting_type_str = data.get("type")
-
db_session = get_db_session()
settings_manager = get_settings_manager(db_session)
- # Import settings
- if setting_type_str:
- try:
- setting_type = SettingType[setting_type_str.upper()]
- success = settings_manager.import_from_file(setting_type)
- except KeyError:
- return (
- jsonify({"error": f"Invalid setting type: {setting_type_str}"}),
- 400,
- )
- else:
- success = settings_manager.import_from_file()
+ success = settings_manager.load_from_defaults_file()
if success:
return jsonify({"message": "Settings imported successfully"})
diff --git a/src/local_deep_research/web/services/settings_manager.py b/src/local_deep_research/web/services/settings_manager.py
index 0c09158f0f..cebf2181b2 100644
--- a/src/local_deep_research/web/services/settings_manager.py
+++ b/src/local_deep_research/web/services/settings_manager.py
@@ -1,15 +1,13 @@
+import importlib.resources as pkg_resources
+import json
import logging
-import os
-from pathlib import Path
from typing import Any, Dict, Optional, Union
-import toml
from sqlalchemy import func
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.orm import Session
-from ...config.config_files import get_config_dir
-from ...config.config_files import settings as dynaconf_settings
+from ... import defaults
from ..database.models import Setting, SettingType
from ..models.settings import (
AppSetting,
@@ -37,13 +35,12 @@ class SettingsManager:
db_session: SQLAlchemy session for database operations
"""
self.db_session = db_session
- self.config_dir = get_config_dir() / "config"
- self.settings_file = self.config_dir / "settings.toml"
- self.search_engines_file = self.config_dir / "search_engines.toml"
- self.collections_file = self.config_dir / "local_collections.toml"
- self.secrets_file = self.config_dir / ".secrets.toml"
self.db_first = True # Always prioritize DB settings
+ # Load default settings.
+ default_settings = pkg_resources.read_text(defaults, "default_settings.json")
+ self.default_settings = json.loads(default_settings)
+
# In-memory cache for settings
self._settings_cache: Dict[str, Any] = {}
@@ -86,22 +83,6 @@ class SettingsManager:
except SQLAlchemyError as e:
logger.error(f"Error retrieving setting {key} from database: {e}")
- # Fall back to Dynaconf settings
- try:
- # Split the key into sections
- parts = key.split(".")
- if len(parts) == 2:
- section, setting = parts
- if hasattr(dynaconf_settings, section) and hasattr(
- getattr(dynaconf_settings, section), setting
- ):
- value = getattr(getattr(dynaconf_settings, section), setting)
- # Update cache and return
- self._settings_cache[key] = value
- return value
- except Exception as e:
- logger.debug(f"Error retrieving setting {key} from Dynaconf: {e}")
-
# Return default if not found
return default
@@ -179,22 +160,23 @@ class SettingsManager:
if self.db_session:
try:
for setting in self.db_session.query(Setting).all():
- result[setting.key] = setting.value
+ result[setting.key] = dict(
+ value=setting.value,
+ type=setting.type.name,
+ name=setting.name,
+ description=setting.description,
+ category=setting.category,
+ ui_element=setting.ui_element,
+ options=setting.options,
+ min_value=setting.min_value,
+ max_value=setting.max_value,
+ step=setting.step,
+ visible=setting.visible,
+ editable=setting.editable,
+ )
except SQLAlchemyError as e:
logger.error(f"Error retrieving all settings from database: {e}")
- # Fill in missing values from Dynaconf (lowest priority)
- for section in ["llm", "search", "report", "app", "web"]:
- if hasattr(dynaconf_settings, section):
- section_obj = getattr(dynaconf_settings, section)
- for key in dir(section_obj):
- if not key.startswith("_") and not callable(
- getattr(section_obj, key)
- ):
- full_key = f"{section}.{key}"
- if full_key not in result:
- result[full_key] = getattr(section_obj, key)
-
return result
def create_or_update_setting(
@@ -323,181 +305,17 @@ class SettingsManager:
self.db_session.rollback()
return False
- def export_to_file(self, setting_type: Optional[SettingType] = None) -> bool:
+ def load_from_defaults_file(self, commit: bool = True) -> bool:
"""
- Export settings to file
+ Import settings from the defaults settings file.
Args:
- setting_type: Type of settings to export (or all if None)
-
- Returns:
- True if successful, False otherwise
- """
- try:
- # Get settings
- settings = self.get_all_settings()
-
- # Group by section
- sections = {}
- for key, value in settings.items():
- # Split key into section and name
- parts = key.split(".", 1)
- if len(parts) == 2:
- section, name = parts
- if section not in sections:
- sections[section] = {}
- sections[section][name] = value
-
- # Write to appropriate file
- if setting_type == SettingType.LLM:
- file_path = self.settings_file
- section_name = "llm"
- elif setting_type == SettingType.SEARCH:
- file_path = self.search_engines_file
- section_name = "search"
- elif setting_type == SettingType.REPORT:
- file_path = self.settings_file
- section_name = "report"
- else:
- # Write all sections to appropriate files
- for section_name, section_data in sections.items():
- if section_name == "search":
- self._write_section_to_file(
- self.search_engines_file, section_name, section_data
- )
- else:
- self._write_section_to_file(
- self.settings_file, section_name, section_data
- )
- return True
-
- # Write specific section
- if section_name in sections:
- return self._write_section_to_file(
- file_path, section_name, sections[section_name]
- )
-
- return False
-
- except Exception as e:
- logger.error(f"Error exporting settings to file: {e}")
- return False
-
- def import_from_file(
- self, setting_type: Optional[SettingType] = None, commit: bool = True
- ) -> bool:
- """
- Import settings from file
-
- Args:
- setting_type: Type of settings to import (or all if None)
commit: Whether to commit changes to database
Returns:
True if successful, False otherwise
"""
- try:
- # Determine file path
- if (
- setting_type == SettingType.LLM
- or setting_type == SettingType.APP
- or setting_type == SettingType.REPORT
- ):
- file_path = self.settings_file
- elif setting_type == SettingType.SEARCH:
- file_path = self.search_engines_file
- else:
- # Import from all files
- success = True
- success &= self.import_from_file(SettingType.LLM, commit=False)
- success &= self.import_from_file(SettingType.SEARCH, commit=False)
- success &= self.import_from_file(SettingType.REPORT, commit=False)
- success &= self.import_from_file(SettingType.APP, commit=False)
-
- # Commit all changes at once
- if commit and self.db_session:
- self.db_session.commit()
-
- return success
-
- # Read from file
- if not os.path.exists(file_path):
- logger.warning(f"Settings file does not exist: {file_path}")
- return False
-
- # Parse TOML file
- with open(file_path, "r") as f:
- file_data = toml.load(f)
-
- # Extract section based on setting type
- section_name = setting_type.value.lower() if setting_type else None
- if section_name and section_name in file_data:
- section_data = file_data[section_name]
- else:
- section_data = file_data
-
- # Import settings
- for key, value in section_data.items():
- if section_name:
- full_key = f"{section_name}.{key}"
- else:
- # Try to determine section from key structure
- if "." in key:
- full_key = key
- else:
- # Assume it's an app setting
- full_key = f"app.{key}"
-
- self.set_setting(full_key, value, commit=False)
-
- # Commit if requested
- if commit and self.db_session:
- self.db_session.commit()
-
- return True
-
- except Exception as e:
- logger.error(f"Error importing settings from file: {e}")
- if self.db_session:
- self.db_session.rollback()
- return False
-
- def _write_section_to_file(
- self, file_path: Path, section: str, data: Dict[str, Any]
- ) -> bool:
- """
- Write a section of settings to a TOML file
-
- Args:
- file_path: Path to the file
- section: Section name
- data: Section data
-
- Returns:
- True if successful, False otherwise
- """
- try:
- # Create file if it doesn't exist
- if not os.path.exists(file_path):
- file_path.parent.mkdir(parents=True, exist_ok=True)
- with open(file_path, "w") as f:
- f.write(f"[{section}]\n")
-
- # Read existing file
- with open(file_path, "r") as f:
- file_data = toml.load(f)
-
- # Update section
- file_data[section] = data
-
- # Write back to file
- with open(file_path, "w") as f:
- toml.dump(file_data, f)
-
- return True
- except Exception as e:
- logger.error(f"Error writing section {section} to {file_path}: {e}")
- return False
+ self.import_settings(self.default_settings, commit=commit)
@classmethod
def get_instance(cls, db_session: Optional[Session] = None) -> "SettingsManager":
@@ -518,100 +336,31 @@ class SettingsManager:
return cls._instance
- def import_default_settings(
- self, main_settings_file, search_engines_file, collections_file
+ def import_settings(
+ self,
+ settings_data: Dict[str, Any],
+ commit: bool = True,
):
"""
- Import settings directly from default files
+ Import settings directly from the export format. This can be used to
+ re-import settings that have been exported with `get_all_settings()`.
Args:
- main_settings_file: Path to the main settings.toml file
- search_engines_file: Path to the search_engines.toml file
- collections_file: Path to the local_collections.toml file
+ settings_data: The raw settings data to import.
+ commit: Whether to commit the DB after loading the settings.
Returns:
True if successful, False otherwise
"""
- if not self.db_session:
- logger.warning(
- "No database session available, cannot import default settings"
- )
- return False
+ for key, setting_values in settings_data.items():
+ # Delete any existing setting so we can completely overwrite it.
+ self.delete_setting(key, commit=False)
- try:
- # Import settings from main settings file
- if os.path.exists(main_settings_file):
- with open(main_settings_file, "r") as f:
- main_data = toml.load(f)
-
- # Process each section in the main settings file
- for section, values in main_data.items():
- if section in ["web", "llm", "general", "app"]:
- setting_type = None
- if section == "web" or section == "app":
- setting_type = SettingType.APP
- prefix = "app"
- elif section == "llm":
- setting_type = SettingType.LLM
- prefix = "llm"
- else: # general section
- # Map general settings to appropriate types
- prefix = None
- for key, value in values.items():
- if key in [
- "enable_fact_checking",
- "knowledge_accumulation",
- "knowledge_accumulation_context_limit",
- "output_dir",
- ]:
- self._create_setting(
- f"report.{key}", value, SettingType.REPORT
- )
-
- # Add settings with correct prefix
- if prefix:
- for key, value in values.items():
- self._create_setting(
- f"{prefix}.{key}", value, setting_type
- )
-
- elif section == "search":
- # Search settings go to search type
- for key, value in values.items():
- self._create_setting(
- f"search.{key}", value, SettingType.SEARCH
- )
-
- elif section == "report":
- # Report settings
- for key, value in values.items():
- self._create_setting(
- f"report.{key}", value, SettingType.REPORT
- )
-
- # Import settings from search engines file
- if os.path.exists(search_engines_file):
- with open(search_engines_file, "r") as f:
- search_data = toml.load(f)
-
- # Find search section in search engines file
- if "search" in search_data:
- for key, value in search_data["search"].items():
- # Skip complex sections that are nested
- if not isinstance(value, dict):
- self._create_setting(
- f"search.{key}", value, SettingType.SEARCH
- )
-
- # Commit changes
- self.db_session.commit()
- return True
+ setting = Setting(key=key, **setting_values)
+ self.db_session.add(setting)
- except Exception as e:
- logger.error(f"Error importing default settings: {e}")
- if self.db_session:
- self.db_session.rollback()
- return False
+ if commit:
+ self.db_session.commit()
def _create_setting(self, key, value, setting_type):
"""Create a setting with appropriate metadata"""
diff --git a/src/local_deep_research/web/services/settings_service.py b/src/local_deep_research/web/services/settings_service.py
index e820863bff..5d1f702cb7 100644
--- a/src/local_deep_research/web/services/settings_service.py
+++ b/src/local_deep_research/web/services/settings_service.py
@@ -166,7 +166,7 @@ def import_settings_from_file(
bool: True if import was successful
"""
manager = get_settings_manager(db_session)
- return manager.import_default_settings(
+ return manager.import_settings(
main_settings_file, search_engines_file, collections_file
)