local-deep-research 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- local_deep_research/__init__.py +1 -1
- local_deep_research/__version__.py +1 -0
- local_deep_research/defaults/default_settings.json +182 -0
- local_deep_research/web/services/settings_manager.py +1 -1
- local_deep_research/web_search_engines/engines/meta_search_engine.py +44 -4
- {local_deep_research-0.3.0.dist-info → local_deep_research-0.3.1.dist-info}/METADATA +1 -1
- {local_deep_research-0.3.0.dist-info → local_deep_research-0.3.1.dist-info}/RECORD +10 -9
- {local_deep_research-0.3.0.dist-info → local_deep_research-0.3.1.dist-info}/WHEEL +0 -0
- {local_deep_research-0.3.0.dist-info → local_deep_research-0.3.1.dist-info}/entry_points.txt +0 -0
- {local_deep_research-0.3.0.dist-info → local_deep_research-0.3.1.dist-info}/licenses/LICENSE +0 -0
local_deep_research/__init__.py
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
Local Deep Research - A tool for conducting deep research using AI.
|
3
3
|
"""
|
4
4
|
|
5
|
-
__version__ = "0.2.0"
|
6
5
|
__author__ = "Your Name"
|
7
6
|
__description__ = "A tool for conducting deep research using AI"
|
8
7
|
|
8
|
+
from .__version__ import __version__
|
9
9
|
from .config.llm_config import get_llm
|
10
10
|
from .config.search_config import get_search
|
11
11
|
from .report_generator import get_report_generator
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.3.1"
|
@@ -3810,5 +3810,187 @@
|
|
3810
3810
|
"ui_element": "number",
|
3811
3811
|
"value": 100,
|
3812
3812
|
"visible": true
|
3813
|
+
},
|
3814
|
+
"search.engine.web.pubmed.use_in_auto_search": {
|
3815
|
+
"category": "pubmed",
|
3816
|
+
"description": "Include PubMed in auto search mode",
|
3817
|
+
"editable": true,
|
3818
|
+
"max_value": null,
|
3819
|
+
"min_value": null,
|
3820
|
+
"name": "Include in Auto Search",
|
3821
|
+
"options": null,
|
3822
|
+
"step": null,
|
3823
|
+
"type": "SEARCH",
|
3824
|
+
"ui_element": "checkbox",
|
3825
|
+
"value": true,
|
3826
|
+
"visible": true
|
3827
|
+
},
|
3828
|
+
"search.engine.web.arxiv.use_in_auto_search": {
|
3829
|
+
"category": "arxiv",
|
3830
|
+
"description": "Include ArXiv in auto search mode",
|
3831
|
+
"editable": true,
|
3832
|
+
"max_value": null,
|
3833
|
+
"min_value": null,
|
3834
|
+
"name": "Include in Auto Search",
|
3835
|
+
"options": null,
|
3836
|
+
"step": null,
|
3837
|
+
"type": "SEARCH",
|
3838
|
+
"ui_element": "checkbox",
|
3839
|
+
"value": true,
|
3840
|
+
"visible": true
|
3841
|
+
},
|
3842
|
+
"search.engine.web.searxng.use_in_auto_search": {
|
3843
|
+
"category": "searxng",
|
3844
|
+
"description": "Include SearXNG in auto search mode",
|
3845
|
+
"editable": true,
|
3846
|
+
"max_value": null,
|
3847
|
+
"min_value": null,
|
3848
|
+
"name": "Include in Auto Search",
|
3849
|
+
"options": null,
|
3850
|
+
"step": null,
|
3851
|
+
"type": "SEARCH",
|
3852
|
+
"ui_element": "checkbox",
|
3853
|
+
"value": true,
|
3854
|
+
"visible": true
|
3855
|
+
},
|
3856
|
+
"search.engine.web.github.use_in_auto_search": {
|
3857
|
+
"category": "github",
|
3858
|
+
"description": "Include GitHub in auto search mode",
|
3859
|
+
"editable": true,
|
3860
|
+
"max_value": null,
|
3861
|
+
"min_value": null,
|
3862
|
+
"name": "Include in Auto Search",
|
3863
|
+
"options": null,
|
3864
|
+
"step": null,
|
3865
|
+
"type": "SEARCH",
|
3866
|
+
"ui_element": "checkbox",
|
3867
|
+
"value": true,
|
3868
|
+
"visible": true
|
3869
|
+
},
|
3870
|
+
"search.engine.web.wikipedia.use_in_auto_search": {
|
3871
|
+
"category": "wikipedia",
|
3872
|
+
"description": "Include Wikipedia in auto search mode",
|
3873
|
+
"editable": true,
|
3874
|
+
"max_value": null,
|
3875
|
+
"min_value": null,
|
3876
|
+
"name": "Include in Auto Search",
|
3877
|
+
"options": null,
|
3878
|
+
"step": null,
|
3879
|
+
"type": "SEARCH",
|
3880
|
+
"ui_element": "checkbox",
|
3881
|
+
"value": true,
|
3882
|
+
"visible": true
|
3883
|
+
},
|
3884
|
+
"search.engine.web.brave.use_in_auto_search": {
|
3885
|
+
"category": "brave",
|
3886
|
+
"description": "Include Brave search in auto search mode",
|
3887
|
+
"editable": true,
|
3888
|
+
"max_value": null,
|
3889
|
+
"min_value": null,
|
3890
|
+
"name": "Include in Auto Search",
|
3891
|
+
"options": null,
|
3892
|
+
"step": null,
|
3893
|
+
"type": "SEARCH",
|
3894
|
+
"ui_element": "checkbox",
|
3895
|
+
"value": false,
|
3896
|
+
"visible": true
|
3897
|
+
},
|
3898
|
+
"search.engine.web.google_pse.use_in_auto_search": {
|
3899
|
+
"category": "google_pse",
|
3900
|
+
"description": "Include Google PSE in auto search mode",
|
3901
|
+
"editable": true,
|
3902
|
+
"max_value": null,
|
3903
|
+
"min_value": null,
|
3904
|
+
"name": "Include in Auto Search",
|
3905
|
+
"options": null,
|
3906
|
+
"step": null,
|
3907
|
+
"type": "SEARCH",
|
3908
|
+
"ui_element": "checkbox",
|
3909
|
+
"value": false,
|
3910
|
+
"visible": true
|
3911
|
+
},
|
3912
|
+
"search.engine.web.serpapi.use_in_auto_search": {
|
3913
|
+
"category": "serpapi",
|
3914
|
+
"description": "Include SerpAPI in auto search mode",
|
3915
|
+
"editable": true,
|
3916
|
+
"max_value": null,
|
3917
|
+
"min_value": null,
|
3918
|
+
"name": "Include in Auto Search",
|
3919
|
+
"options": null,
|
3920
|
+
"step": null,
|
3921
|
+
"type": "SEARCH",
|
3922
|
+
"ui_element": "checkbox",
|
3923
|
+
"value": false,
|
3924
|
+
"visible": true
|
3925
|
+
},
|
3926
|
+
"search.engine.web.wayback.use_in_auto_search": {
|
3927
|
+
"category": "wayback",
|
3928
|
+
"description": "Include Wayback in auto search mode",
|
3929
|
+
"editable": true,
|
3930
|
+
"max_value": null,
|
3931
|
+
"min_value": null,
|
3932
|
+
"name": "Include in Auto Search",
|
3933
|
+
"options": null,
|
3934
|
+
"step": null,
|
3935
|
+
"type": "SEARCH",
|
3936
|
+
"ui_element": "checkbox",
|
3937
|
+
"value": false,
|
3938
|
+
"visible": true
|
3939
|
+
},
|
3940
|
+
"search.engine.local.local_all.use_in_auto_search": {
|
3941
|
+
"category": "local_all",
|
3942
|
+
"description": "Include local documents in auto search mode",
|
3943
|
+
"editable": true,
|
3944
|
+
"max_value": null,
|
3945
|
+
"min_value": null,
|
3946
|
+
"name": "Include in Auto Search",
|
3947
|
+
"options": null,
|
3948
|
+
"step": null,
|
3949
|
+
"type": "SEARCH",
|
3950
|
+
"ui_element": "checkbox",
|
3951
|
+
"value": true,
|
3952
|
+
"visible": true
|
3953
|
+
},
|
3954
|
+
"search.engine.local.personal_notes.use_in_auto_search": {
|
3955
|
+
"category": "personal_notes",
|
3956
|
+
"description": "Include personal notes in auto search mode",
|
3957
|
+
"editable": true,
|
3958
|
+
"max_value": null,
|
3959
|
+
"min_value": null,
|
3960
|
+
"name": "Include in Auto Search",
|
3961
|
+
"options": null,
|
3962
|
+
"step": null,
|
3963
|
+
"type": "SEARCH",
|
3964
|
+
"ui_element": "checkbox",
|
3965
|
+
"value": false,
|
3966
|
+
"visible": true
|
3967
|
+
},
|
3968
|
+
"search.engine.local.project_docs.use_in_auto_search": {
|
3969
|
+
"category": "project_docs",
|
3970
|
+
"description": "Include project documents in auto search mode",
|
3971
|
+
"editable": true,
|
3972
|
+
"max_value": null,
|
3973
|
+
"min_value": null,
|
3974
|
+
"name": "Include in Auto Search",
|
3975
|
+
"options": null,
|
3976
|
+
"step": null,
|
3977
|
+
"type": "SEARCH",
|
3978
|
+
"ui_element": "checkbox",
|
3979
|
+
"value": false,
|
3980
|
+
"visible": true
|
3981
|
+
},
|
3982
|
+
"search.engine.local.research_papers.use_in_auto_search": {
|
3983
|
+
"category": "research_papers",
|
3984
|
+
"description": "Include research papers in auto search mode",
|
3985
|
+
"editable": true,
|
3986
|
+
"max_value": null,
|
3987
|
+
"min_value": null,
|
3988
|
+
"name": "Include in Auto Search",
|
3989
|
+
"options": null,
|
3990
|
+
"step": null,
|
3991
|
+
"type": "SEARCH",
|
3992
|
+
"ui_element": "checkbox",
|
3993
|
+
"value": false,
|
3994
|
+
"visible": true
|
3813
3995
|
}
|
3814
3996
|
}
|
@@ -34,7 +34,7 @@ def check_env_setting(key: str) -> str | None:
|
|
34
34
|
is not set.
|
35
35
|
|
36
36
|
"""
|
37
|
-
env_variable_name = f"LDR_{
|
37
|
+
env_variable_name = f"LDR_{'_'.join(key.split('.')).upper()}"
|
38
38
|
env_value = os.getenv(env_variable_name)
|
39
39
|
if env_value is not None:
|
40
40
|
logger.debug(f"Overriding {key} setting from environment variable.")
|
@@ -65,16 +65,43 @@ class MetaSearchEngine(BaseSearchEngine):
|
|
65
65
|
)
|
66
66
|
|
67
67
|
def _get_available_engines(self) -> List[str]:
|
68
|
-
"""Get list of available engines, excluding 'meta' and 'auto'"""
|
68
|
+
"""Get list of available engines, excluding 'meta' and 'auto', based on user settings"""
|
69
69
|
# Filter out 'meta' and 'auto' and check API key availability
|
70
70
|
available = []
|
71
|
+
|
71
72
|
for name, config_ in search_config().items():
|
72
73
|
if name in ["meta", "auto"]:
|
73
74
|
continue
|
74
75
|
|
76
|
+
# Determine if this is a local engine (starts with "local.")
|
77
|
+
is_local_engine = name.startswith("local.")
|
78
|
+
|
79
|
+
# Determine the appropriate setting path based on engine type
|
80
|
+
if is_local_engine:
|
81
|
+
# Format: search.engine.local.{engine_name}.use_in_auto_search
|
82
|
+
local_name = name.replace("local.", "")
|
83
|
+
auto_search_setting = (
|
84
|
+
f"search.engine.local.{local_name}.use_in_auto_search"
|
85
|
+
)
|
86
|
+
else:
|
87
|
+
# Format: search.engine.web.{engine_name}.use_in_auto_search
|
88
|
+
auto_search_setting = f"search.engine.web.{name}.use_in_auto_search"
|
89
|
+
|
90
|
+
# Get setting from database, default to False if not found
|
91
|
+
use_in_auto_search = get_db_setting(auto_search_setting, False)
|
92
|
+
|
93
|
+
# Skip engines that aren't enabled for auto search
|
94
|
+
if not use_in_auto_search:
|
95
|
+
logger.info(
|
96
|
+
f"Skipping {name} engine because it's not enabled for auto search"
|
97
|
+
)
|
98
|
+
continue
|
99
|
+
|
100
|
+
# Skip engines that require API keys if we don't want to use them
|
75
101
|
if config_.get("requires_api_key", False) and not self.use_api_key_services:
|
76
102
|
continue
|
77
103
|
|
104
|
+
# Skip engines that require API keys if the key is not available
|
78
105
|
if config_.get("requires_api_key", False):
|
79
106
|
api_key = config_.get("api_key")
|
80
107
|
if not api_key:
|
@@ -82,9 +109,11 @@ class MetaSearchEngine(BaseSearchEngine):
|
|
82
109
|
|
83
110
|
available.append(name)
|
84
111
|
|
85
|
-
#
|
86
|
-
if not available
|
87
|
-
|
112
|
+
# If no engines are available, raise an error instead of falling back silently
|
113
|
+
if not available:
|
114
|
+
error_msg = "No search engines enabled for auto search. Please enable at least one engine in settings."
|
115
|
+
logger.error(error_msg)
|
116
|
+
raise RuntimeError(error_msg)
|
88
117
|
|
89
118
|
return available
|
90
119
|
|
@@ -131,6 +160,17 @@ class MetaSearchEngine(BaseSearchEngine):
|
|
131
160
|
except KeyError as e:
|
132
161
|
logger.error(f"Missing key for engine {engine_name}: {str(e)}")
|
133
162
|
|
163
|
+
# Only proceed if we have engines available to choose from
|
164
|
+
if not engines_info:
|
165
|
+
logger.warning(
|
166
|
+
"No engine information available for prompt, using reliability-based sorting instead"
|
167
|
+
)
|
168
|
+
return sorted(
|
169
|
+
self.available_engines,
|
170
|
+
key=lambda x: search_config().get(x, {}).get("reliability", 0),
|
171
|
+
reverse=True,
|
172
|
+
)
|
173
|
+
|
134
174
|
prompt = f"""You are a search query analyst. Consider this search query:
|
135
175
|
|
136
176
|
QUERY: {query}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: local-deep-research
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.1
|
4
4
|
Summary: AI-powered research assistant with deep, iterative analysis using LLMs and web searches
|
5
5
|
Author-Email: LearningCircuit <185559241+LearningCircuit@users.noreply.github.com>, HashedViking <6432677+HashedViking@users.noreply.github.com>
|
6
6
|
License: MIT License
|
@@ -1,9 +1,10 @@
|
|
1
|
-
local_deep_research-0.3.
|
2
|
-
local_deep_research-0.3.
|
3
|
-
local_deep_research-0.3.
|
4
|
-
local_deep_research-0.3.
|
5
|
-
local_deep_research/__init__.py,sha256=
|
1
|
+
local_deep_research-0.3.1.dist-info/METADATA,sha256=hm0xOekqqqLIN0jglNZfEIsEZXrlg29PaAPgav3jFd4,20274
|
2
|
+
local_deep_research-0.3.1.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
local_deep_research-0.3.1.dist-info/entry_points.txt,sha256=GcXS501Rjh-P80S8db7hnrQ23mS_Jg27PwpVQVO77as,113
|
4
|
+
local_deep_research-0.3.1.dist-info/licenses/LICENSE,sha256=Qg2CaTdu6SWnSqk1_JtgBPp_Da-LdqJDhT1Vt1MUc5s,1072
|
5
|
+
local_deep_research/__init__.py,sha256=9wV3oonZMEHsE_JhyZU9P0hW2Uwv47zotGlbAB_gQiA,885
|
6
6
|
local_deep_research/__main__.py,sha256=LIxK5iS6aLAKMFBDpUS3V-jDcxchqi3eSUsI2jAZUXk,371
|
7
|
+
local_deep_research/__version__.py,sha256=r4xAFihOf72W9TD-lpMi6ntWSTKTP2SlzKP1ytkjRbI,22
|
7
8
|
local_deep_research/advanced_search_system/__init__.py,sha256=sGusMj4eFIrhXR6QbOM16UDKB6aI-iS4IFivKWpMlh0,234
|
8
9
|
local_deep_research/advanced_search_system/filters/__init__.py,sha256=2dXrV4skcVHI2Lb3BSL2Ajq0rnLeSw7kc1MbIynMxa4,190
|
9
10
|
local_deep_research/advanced_search_system/filters/base_filter.py,sha256=dFNQ7U2dj4bf3voT73YhcG-w9eW-BTlc4F9kstFcETY,969
|
@@ -39,7 +40,7 @@ local_deep_research/config/llm_config.py,sha256=Ot61pHJVAjgX9l3SmaoyxcaQg1pd2dmK
|
|
39
40
|
local_deep_research/config/search_config.py,sha256=ruryPSS4Wy9-xi_02c-98KLKaELeLnZ10pnCpc0-ogg,2171
|
40
41
|
local_deep_research/defaults/.env.template,sha256=_eVCy4d_XwpGXy8n50CG3wH9xx2oqJCFKS7IbqgInDk,491
|
41
42
|
local_deep_research/defaults/__init__.py,sha256=C_0t0uZmtrVB4rM9NM9Wx8PJU5kFcT-qOHvws5W2iOg,1352
|
42
|
-
local_deep_research/defaults/default_settings.json,sha256=
|
43
|
+
local_deep_research/defaults/default_settings.json,sha256=J9vhJHu2lMYMJnw68kO4e0So3SrMrHUwbjPW7i4LAPc,119769
|
43
44
|
local_deep_research/main.py,sha256=umGmaQmW7bpx27wUAgSNjNr4oSHV6mDX5hoyfb22HEY,7033
|
44
45
|
local_deep_research/migrate_db.py,sha256=S1h6Bv0OJdRW4BaH7MIMrUXBRV_yqgH2T6LVOZKTQjI,4634
|
45
46
|
local_deep_research/report_generator.py,sha256=-G3KDEbsuU3PdxDfuo5v28DIX7RE1yJCCBU2KgRbNzI,9084
|
@@ -68,7 +69,7 @@ local_deep_research/web/routes/research_routes.py,sha256=JlzaP1z-7XAP3E0nkEjLIfY
|
|
68
69
|
local_deep_research/web/routes/settings_routes.py,sha256=r9RbCCD37rqPsQPFyzlku6OElzQP-nuLbL4AH6e6Fgo,49233
|
69
70
|
local_deep_research/web/services/research_service.py,sha256=vs_pWuv56rG2atgSamlDK4MdxpWTxbBVf3rHztr6y2A,39488
|
70
71
|
local_deep_research/web/services/resource_service.py,sha256=yKgOC6GEOmHqRoGzwf52e19UaGCCS1DbDbOIXgWGvGc,4378
|
71
|
-
local_deep_research/web/services/settings_manager.py,sha256=
|
72
|
+
local_deep_research/web/services/settings_manager.py,sha256=lHc0Arh9RR4D_Dubj6OxtlZw7MvHtdY8Db9p5LnX_ac,16376
|
72
73
|
local_deep_research/web/services/settings_service.py,sha256=SgmjhMvGZjJE63hKKaqY7kPGphnUyXcQG8NFN5rTizs,3550
|
73
74
|
local_deep_research/web/services/socket_service.py,sha256=jZGXk6kesBOf4bAdLiT3V4Ofod12pGKTsvxr3ml8ydY,7272
|
74
75
|
local_deep_research/web/static/css/custom_dropdown.css,sha256=-pCx6oazWVgwqFAGq_eZ8OrTKMVQlgkKYCM6w-bACLs,7949
|
@@ -113,7 +114,7 @@ local_deep_research/web/utils/formatters.py,sha256=Gj_a0oFveNXHtvkiFe1rwlEtzYerM
|
|
113
114
|
local_deep_research/web_search_engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
114
115
|
local_deep_research/web_search_engines/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
116
|
local_deep_research/web_search_engines/engines/full_search.py,sha256=6Pi_wj9oAtDHAyLsIbWGBeS8QBv6yCJEJ87LN68Cp-k,4703
|
116
|
-
local_deep_research/web_search_engines/engines/meta_search_engine.py,sha256=
|
117
|
+
local_deep_research/web_search_engines/engines/meta_search_engine.py,sha256=qUFl8yw5l7sfH-BRpXXrNQ2KrQ9LsaslhG1glb2AOIM,14715
|
117
118
|
local_deep_research/web_search_engines/engines/search_engine_arxiv.py,sha256=3k8R4pyqIZf0RDMqXDw08xIGsfkp4ZR9kePDbmeuaH0,16603
|
118
119
|
local_deep_research/web_search_engines/engines/search_engine_brave.py,sha256=y1j4CSLM0Ujw1LSBiWg1ZBnc2BvrkhDCorrQLnUBVtM,9149
|
119
120
|
local_deep_research/web_search_engines/engines/search_engine_ddg.py,sha256=w9vRDpt_L0h5J-PWiNO_3J5uuRsfk5smlcIQjRofwB4,4649
|
@@ -131,4 +132,4 @@ local_deep_research/web_search_engines/engines/search_engine_wikipedia.py,sha256
|
|
131
132
|
local_deep_research/web_search_engines/search_engine_base.py,sha256=PLU_sAWhWKTOQWcv32GINuhLdIwB0sEQy-pp9oG9Ggo,9835
|
132
133
|
local_deep_research/web_search_engines/search_engine_factory.py,sha256=DghAkQvLKRJYl5xb9AUjUv7ydAQ4rPi-TvzrmqdyGxE,10890
|
133
134
|
local_deep_research/web_search_engines/search_engines_config.py,sha256=rgKo3UQhXov_4QxPcdzMqnAfJc5a6tGXtfnjIzKeHdQ,4584
|
134
|
-
local_deep_research-0.3.
|
135
|
+
local_deep_research-0.3.1.dist-info/RECORD,,
|
File without changes
|
{local_deep_research-0.3.0.dist-info → local_deep_research-0.3.1.dist-info}/entry_points.txt
RENAMED
File without changes
|
{local_deep_research-0.3.0.dist-info → local_deep_research-0.3.1.dist-info}/licenses/LICENSE
RENAMED
File without changes
|