local-deep-research 0.1.13__py3-none-any.whl → 0.1.14__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.
Files changed (26) hide show
  1. local_deep_research/config.py +8 -8
  2. local_deep_research/defaults/search_engines.toml +39 -18
  3. local_deep_research/search_system.py +15 -9
  4. local_deep_research/utilties/enums.py +4 -4
  5. local_deep_research/web/app.py +3 -2
  6. local_deep_research/web_search_engines/engines/search_engine_arxiv.py +3 -5
  7. local_deep_research/web_search_engines/engines/search_engine_brave.py +3 -5
  8. local_deep_research/web_search_engines/engines/search_engine_ddg.py +4 -3
  9. local_deep_research/web_search_engines/engines/search_engine_github.py +2 -4
  10. local_deep_research/web_search_engines/engines/search_engine_google_pse.py +2 -4
  11. local_deep_research/web_search_engines/engines/search_engine_guardian.py +323 -78
  12. local_deep_research/web_search_engines/engines/search_engine_local_all.py +3 -5
  13. local_deep_research/web_search_engines/engines/search_engine_pubmed.py +3 -4
  14. local_deep_research/web_search_engines/engines/search_engine_searxng.py +3 -2
  15. local_deep_research/web_search_engines/engines/search_engine_semantic_scholar.py +1128 -0
  16. local_deep_research/web_search_engines/engines/search_engine_serpapi.py +2 -4
  17. local_deep_research/web_search_engines/engines/search_engine_wayback.py +2 -4
  18. local_deep_research/web_search_engines/engines/search_engine_wikipedia.py +2 -4
  19. local_deep_research/web_search_engines/search_engine_base.py +12 -4
  20. {local_deep_research-0.1.13.dist-info → local_deep_research-0.1.14.dist-info}/METADATA +1 -1
  21. {local_deep_research-0.1.13.dist-info → local_deep_research-0.1.14.dist-info}/RECORD +25 -25
  22. local_deep_research/web_search_engines/engines/search_engine_medrxiv.py +0 -623
  23. {local_deep_research-0.1.13.dist-info → local_deep_research-0.1.14.dist-info}/WHEEL +0 -0
  24. {local_deep_research-0.1.13.dist-info → local_deep_research-0.1.14.dist-info}/entry_points.txt +0 -0
  25. {local_deep_research-0.1.13.dist-info → local_deep_research-0.1.14.dist-info}/licenses/LICENSE +0 -0
  26. {local_deep_research-0.1.13.dist-info → local_deep_research-0.1.14.dist-info}/top_level.txt +0 -0
@@ -38,10 +38,8 @@ class SerpAPISearchEngine(BaseSearchEngine):
38
38
  max_filtered_results: Maximum number of results to keep after filtering
39
39
  **kwargs: Additional parameters (ignored but accepted for compatibility)
40
40
  """
41
- # Initialize the BaseSearchEngine with the LLM and max_filtered_results
42
- super().__init__(llm=llm, max_filtered_results=max_filtered_results)
43
-
44
- self.max_results = max_results
41
+ # Initialize the BaseSearchEngine with LLM, max_filtered_results, and max_results
42
+ super().__init__(llm=llm, max_filtered_results=max_filtered_results, max_results=max_results)
45
43
  self.include_full_content = include_full_content
46
44
 
47
45
  # Set up language code mapping
@@ -38,10 +38,8 @@ class WaybackSearchEngine(BaseSearchEngine):
38
38
  max_filtered_results: Maximum number of results to keep after filtering
39
39
  closest_only: If True, only retrieves the closest snapshot for each URL
40
40
  """
41
- # Initialize the BaseSearchEngine with the LLM and max_filtered_results
42
- super().__init__(llm=llm, max_filtered_results=max_filtered_results)
43
-
44
- self.max_results = max_results
41
+ # Initialize the BaseSearchEngine with LLM, max_filtered_results, and max_results
42
+ super().__init__(llm=llm, max_filtered_results=max_filtered_results, max_results=max_results)
45
43
  self.max_snapshots_per_url = max_snapshots_per_url
46
44
  self.language = language
47
45
  self.closest_only = closest_only
@@ -33,10 +33,8 @@ class WikipediaSearchEngine(BaseSearchEngine):
33
33
  max_filtered_results: Maximum number of results to keep after filtering
34
34
  **kwargs: Additional parameters (ignored but accepted for compatibility)
35
35
  """
36
- # Initialize the BaseSearchEngine with the LLM and max_filtered_results
37
- super().__init__(llm=llm, max_filtered_results=max_filtered_results)
38
-
39
- self.max_results = max_results
36
+ # Initialize the BaseSearchEngine with LLM, max_filtered_results, and max_results
37
+ super().__init__(llm=llm, max_filtered_results=max_filtered_results, max_results=max_results)
40
38
  self.include_content = include_content
41
39
  self.sentences = sentences
42
40
 
@@ -15,20 +15,28 @@ class BaseSearchEngine(ABC):
15
15
  """
16
16
 
17
17
  def __init__(self,
18
- llm: Optional[BaseLLM] = None,
19
- max_filtered_results: Optional[int] = 5,
20
- **kwargs):
18
+ llm: Optional[BaseLLM] = None,
19
+ max_filtered_results: Optional[int] = None,
20
+ max_results: Optional[int] = 10, # Default value if not provided
21
+ **kwargs):
21
22
  """
22
23
  Initialize the search engine with common parameters.
23
24
 
24
25
  Args:
25
26
  llm: Optional language model for relevance filtering
26
27
  max_filtered_results: Maximum number of results to keep after filtering
28
+ max_results: Maximum number of search results to return
27
29
  **kwargs: Additional engine-specific parameters
28
30
  """
29
- if max_filtered_results == None: max_filtered_results=5
31
+ if max_filtered_results == None: max_filtered_results = 5
30
32
  self.llm = llm # LLM for relevance filtering
31
33
  self.max_filtered_results = max_filtered_results # Limit filtered results
34
+
35
+ # Ensure max_results is never None and is a positive integer
36
+ if max_results is None:
37
+ self.max_results = 25 # Default if None
38
+ else:
39
+ self.max_results = max(1, int(max_results))
32
40
 
33
41
  def run(self, query: str) -> List[Dict[str, Any]]:
34
42
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: local-deep-research
3
- Version: 0.1.13
3
+ Version: 0.1.14
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,22 +1,22 @@
1
1
  local_deep_research/__init__.py,sha256=pfHzjzYc6Szo8VCNLtFZRXyAlEz7CViY7r2fH9O7yms,584
2
2
  local_deep_research/citation_handler.py,sha256=1Znl5SPkVwOZ3JvFowvaW1uriaw37s1nPYhXbpa2UZ0,4423
3
- local_deep_research/config.py,sha256=g_tRHJ0RdtWC8jXclyMiCrmQC3e3lS8mRmBM74WiNlU,8628
3
+ local_deep_research/config.py,sha256=lucqOE4KeNm1ynYdcHYWJLE5fJ0QN-1QKZpRcBPsHe8,8674
4
4
  local_deep_research/local_collections.py,sha256=SB-fdptT7qS0klJUVx_Rs9OgDwafMUgI46984WlZGKI,6076
5
5
  local_deep_research/main.py,sha256=uQXtGQ6LtZNd5Qw63D5ke4Q_LjYimouWVSUknVsk3JQ,3645
6
6
  local_deep_research/report_generator.py,sha256=UOiSw_vPHgtUpI8L9_UaOlpBVBloPB-ilhAo-1d2B9M,8200
7
- local_deep_research/search_system.py,sha256=K2jJDW8OD44PjFi8xnnVC5rlNGZN1SyMWiVz2KBhxGs,15099
7
+ local_deep_research/search_system.py,sha256=qQoIBIfs1Lvc8vdYtluL62ej7iql0HGz_dbEeYdy8jc,15697
8
8
  local_deep_research/defaults/__init__.py,sha256=2Vvlkl-gmP_qPYWegE4JBgummypogl3VXrQ1XzptFDU,1381
9
9
  local_deep_research/defaults/llm_config.py,sha256=88IGWPPvikSKmAqfqsGovBx2Jac5eh2sBY_LIW624Ik,7910
10
10
  local_deep_research/defaults/local_collections.toml,sha256=_edVWVHrhunMfazjejhJlGPRkHKKIP51qQtNkMgNEiA,1406
11
11
  local_deep_research/defaults/main.toml,sha256=l_J9JAPhKEp63IsLBO0hQDVimxogEpnrEVnNjiOeUxg,1403
12
- local_deep_research/defaults/search_engines.toml,sha256=lK2lm9qgQkY308B3RVEa5UsksFKuZN-Sz7ES7w7YuLg,7770
12
+ local_deep_research/defaults/search_engines.toml,sha256=-jjuG9G6H8dQemZGs6ytZwAdJLbVcWTlCw_SVDNgQXQ,8101
13
13
  local_deep_research/utilties/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- local_deep_research/utilties/enums.py,sha256=QQxov4i1VED_eZnDlOz4Oro4rLgP4pfpUal8ksUL2uE,196
14
+ local_deep_research/utilties/enums.py,sha256=TVAZiu9szNbdacfb7whgaQJJlSk7oYByADaAierD4CE,229
15
15
  local_deep_research/utilties/llm_utils.py,sha256=IGv-_gJWqLTpO3_op1NHIwxKaFEzmXhhVYSLTTSMnIA,4522
16
16
  local_deep_research/utilties/search_utilities.py,sha256=C8ycFd7blcq5vtnd6GxP8dkepZT6EEqHFtT3WYxF0Ck,4151
17
17
  local_deep_research/utilties/setup_utils.py,sha256=t6GNp7lK1nLPdPNCkYUk82IATGM62vqy8UBD-KqShOs,215
18
18
  local_deep_research/web/__init__.py,sha256=3oHMatNu8r24FBtpojriIVbHYOVSHj4Q-quycMKOuDk,62
19
- local_deep_research/web/app.py,sha256=h2Ic90tIHeoRjnouTCiGlyxLQW46o2TMzicZ2h_4kA8,73488
19
+ local_deep_research/web/app.py,sha256=deo4dJKBhhcAdIgtZ3Js-CIb2kXZDk0uPyyW823FtF8,73608
20
20
  local_deep_research/web/static/css/styles.css,sha256=mW217FfZNW1pzMtlbuXE2fRBJekeIdIoy4m-yXFirj4,23782
21
21
  local_deep_research/web/static/js/app.js,sha256=GPncdWpw2YNTs56JY-0tjTTr9JnX-fIZSZX0agwKZMU,172813
22
22
  local_deep_research/web/templates/api_keys_config.html,sha256=jA8Y-nfUGJ1dTvbw2jK_8xPy2x6UG_5gHpbrTJAex2g,3527
@@ -29,29 +29,29 @@ local_deep_research/web/templates/settings.html,sha256=S9A-tdpzMhP2Zw7kp2jxKlwaW
29
29
  local_deep_research/web/templates/settings_dashboard.html,sha256=De-v1KNdVvkXme5i3YZ6sIfU9aAKDc_N-AW9n4PZoso,9109
30
30
  local_deep_research/web_search_engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  local_deep_research/web_search_engines/full_search.py,sha256=3SSTvD12g4pNlZCSGh8jwsyYWpQglgqjADnq8dG1zyI,9756
32
- local_deep_research/web_search_engines/search_engine_base.py,sha256=w8CJdtkcp_Ba-R3mm0RLPVap1Fu1xcfIEmge1IUUhTI,8417
32
+ local_deep_research/web_search_engines/search_engine_base.py,sha256=ig1sv1EVXZ9NqVA2lZJIKMjDxl9W8Gb7rTc_oRbsnSU,8803
33
33
  local_deep_research/web_search_engines/search_engine_factory.py,sha256=B_QaqoAwnVXCmHNdqGbo94LekWY6wpBw_PWNkI120qE,10728
34
34
  local_deep_research/web_search_engines/search_engines_config.py,sha256=bNCuR09NOk5cjnKIgDQfhPipqmvDKeE7WP_6p8LLZf0,1979
35
35
  local_deep_research/web_search_engines/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  local_deep_research/web_search_engines/engines/full_search.py,sha256=mcxS8o7-WmOQc3_H4232adhBHevZfSHWmaOFoia68UU,4711
37
37
  local_deep_research/web_search_engines/engines/meta_search_engine.py,sha256=Zky4sowCortEaIj1pBU0sKuggXr5izkubgrD7cM8IOQ,11485
38
- local_deep_research/web_search_engines/engines/search_engine_arxiv.py,sha256=h6EEGk0UNoEgIaEY5WnKdeLngPCDCBxSQ6ZNM_J-QkQ,15370
39
- local_deep_research/web_search_engines/engines/search_engine_brave.py,sha256=_lNqCZIR_3YpO0zScqaTsMVMej0tfcX1nUqnVGx4RJI,9597
40
- local_deep_research/web_search_engines/engines/search_engine_ddg.py,sha256=8aRiCksT0iO1BWfyX43vVJekJI9JatOjQEUTUNGsNEw,4686
41
- local_deep_research/web_search_engines/engines/search_engine_github.py,sha256=3qH-W8DnHWEL0v9L_jp-O3xb8nfCGNZoGlX6Vg1Iv78,26781
42
- local_deep_research/web_search_engines/engines/search_engine_google_pse.py,sha256=1BSlGdg6SjL3TMxRbp-x9fnH6bqaaP1l8KK1T6fySJo,11307
43
- local_deep_research/web_search_engines/engines/search_engine_guardian.py,sha256=oLYC7qENmCnwwQPW8kruZ1R8XBWcGL0Ek84tOXDHrbk,12486
38
+ local_deep_research/web_search_engines/engines/search_engine_arxiv.py,sha256=WlKQSB1kgdEaLtDj4JwpIiP3eZPustJt4ryJ9wiulT0,15316
39
+ local_deep_research/web_search_engines/engines/search_engine_brave.py,sha256=zAofutKEnXb_CYAi7hrptNVrQ15PQoYK_Eg3spcD1Ig,9583
40
+ local_deep_research/web_search_engines/engines/search_engine_ddg.py,sha256=-_rWr2uwSoxHLkAV-WrHj_vuoSActr_jzfveI7dE10c,4845
41
+ local_deep_research/web_search_engines/engines/search_engine_github.py,sha256=qqipsw2ycjlRbR6mmMmxzGU3LEcFDJJJ7Ez7xUgWjRM,26768
42
+ local_deep_research/web_search_engines/engines/search_engine_google_pse.py,sha256=YkXvBmgcqTImCxuyy6580SGRAvImGc6SzInXZgo1kNE,11294
43
+ local_deep_research/web_search_engines/engines/search_engine_guardian.py,sha256=MW4WIwtNAwcpdigNXronyezAxr50EIZTV1NMedrAv2o,23912
44
44
  local_deep_research/web_search_engines/engines/search_engine_local.py,sha256=uAsNtaFV3AH4ltNpudHIl546jsOKKyGDjUwU5J7gKts,36766
45
- local_deep_research/web_search_engines/engines/search_engine_local_all.py,sha256=nmVAUb1VlzWSQLWtfiN1Yiwo3ehOu0nQAIV1N6P8_5c,5924
46
- local_deep_research/web_search_engines/engines/search_engine_medrxiv.py,sha256=rkWqhgEUxUoHMWaJeA1JTYKyzsTguQejg6qEeDOG_lo,24009
47
- local_deep_research/web_search_engines/engines/search_engine_pubmed.py,sha256=AnYcSsy1Q1puG_ZcS6t0mLu-ZgKfdqkOE5-FtLlrYcc,39199
48
- local_deep_research/web_search_engines/engines/search_engine_searxng.py,sha256=9qR2_DJ-K7dibR4dzoDd3ImfT8C5r3lrXzr8fzVuYPs,18012
49
- local_deep_research/web_search_engines/engines/search_engine_serpapi.py,sha256=0zFskxH5MDDzTpwSXjdM25J8vcJrI7xtjnQDpodRZb0,9131
50
- local_deep_research/web_search_engines/engines/search_engine_wayback.py,sha256=BJ6MBuryJ88VVT_YtNx04ruagCx95rE9W7Af0DboAbI,18145
51
- local_deep_research/web_search_engines/engines/search_engine_wikipedia.py,sha256=LSLOA0AuNy_Yb1-qeAEiwx_fFr2qK8FQG4pY5j-VycY,9812
52
- local_deep_research-0.1.13.dist-info/licenses/LICENSE,sha256=Qg2CaTdu6SWnSqk1_JtgBPp_Da-LdqJDhT1Vt1MUc5s,1072
53
- local_deep_research-0.1.13.dist-info/METADATA,sha256=Dz3RkCqRvzMLR85BI-CjWkD7NDXcDL0vF0cOaJUfllQ,15151
54
- local_deep_research-0.1.13.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
55
- local_deep_research-0.1.13.dist-info/entry_points.txt,sha256=u-Y6Z3MWtR3dmsTDFYhXyfkPv7mALUA7YAnY4Fi1XDs,97
56
- local_deep_research-0.1.13.dist-info/top_level.txt,sha256=h6-uVE_wSuLOcoWwT9szhX23mBWufu77MqmM25UfbCY,20
57
- local_deep_research-0.1.13.dist-info/RECORD,,
45
+ local_deep_research/web_search_engines/engines/search_engine_local_all.py,sha256=CRNcxBzNd9kanyIJYaUDB7qfXYxVCvd4L2mX8jL73v0,5955
46
+ local_deep_research/web_search_engines/engines/search_engine_pubmed.py,sha256=MayfzM2R0XoI7cpXlG1XJ1ktfTN_6H-Xs9RmD89UAao,39236
47
+ local_deep_research/web_search_engines/engines/search_engine_searxng.py,sha256=GMy6qDMSaVBtjWRm48XBu6TjLAy1HfcO2EFTwr8S9rk,18048
48
+ local_deep_research/web_search_engines/engines/search_engine_semantic_scholar.py,sha256=y-g7L9P91XXrO4-2tueHB0FoE4N2cPEOUhjYnXNvWYs,44950
49
+ local_deep_research/web_search_engines/engines/search_engine_serpapi.py,sha256=iy-QmT99Tf2cJlfCrPbEhtMB7a_zCKppvlUKi7VBrlE,9118
50
+ local_deep_research/web_search_engines/engines/search_engine_wayback.py,sha256=astAvSLajDZ6rwgthJ3iBcHSWuDSYPO7uilIxaJhXmU,18132
51
+ local_deep_research/web_search_engines/engines/search_engine_wikipedia.py,sha256=KSGJECbEcxZpVK-PhYsTCtzedSK0l1AjQmvGtx8KBks,9799
52
+ local_deep_research-0.1.14.dist-info/licenses/LICENSE,sha256=Qg2CaTdu6SWnSqk1_JtgBPp_Da-LdqJDhT1Vt1MUc5s,1072
53
+ local_deep_research-0.1.14.dist-info/METADATA,sha256=Qo4XpPKiUmxCZ2JvL-WrDprZYuqq3BKFivAej7x7HhY,15151
54
+ local_deep_research-0.1.14.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
55
+ local_deep_research-0.1.14.dist-info/entry_points.txt,sha256=u-Y6Z3MWtR3dmsTDFYhXyfkPv7mALUA7YAnY4Fi1XDs,97
56
+ local_deep_research-0.1.14.dist-info/top_level.txt,sha256=h6-uVE_wSuLOcoWwT9szhX23mBWufu77MqmM25UfbCY,20
57
+ local_deep_research-0.1.14.dist-info/RECORD,,