local-deep-research 0.5.6__py3-none-any.whl → 0.5.9__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.
@@ -1 +1 @@
1
- __version__ = "0.5.6"
1
+ __version__ = "0.5.9"
@@ -55,7 +55,7 @@ class FocusedIterationStrategy(BaseSearchStrategy):
55
55
  all_links_of_system=None,
56
56
  max_iterations: int = 8, # OPTIMAL FOR SIMPLEQA: 96.51% accuracy achieved
57
57
  questions_per_iteration: int = 5, # OPTIMAL FOR SIMPLEQA: proven config
58
- use_browsecomp_optimization: bool = False, # Can be False for pure SimpleQA
58
+ use_browsecomp_optimization: bool = True, # Can be False for pure SimpleQA
59
59
  ):
60
60
  """Initialize with components optimized for focused iteration."""
61
61
  super().__init__(all_links_of_system)
@@ -247,6 +247,7 @@ class FocusedIterationStrategy(BaseSearchStrategy):
247
247
 
248
248
  # Accumulate all results (no filtering!)
249
249
  self.all_search_results.extend(iteration_results)
250
+ self.all_links_of_system.extend(iteration_results)
250
251
 
251
252
  # Update progress
252
253
  self._update_progress(
@@ -184,7 +184,7 @@
184
184
  "category": "llm_parameters",
185
185
  "description": "Maximum number of tokens in model responses",
186
186
  "editable": true,
187
- "max_value": 4096.0,
187
+ "max_value": 100000,
188
188
  "min_value": 100.0,
189
189
  "name": "Max Tokens",
190
190
  "options": null,
@@ -1,5 +1,6 @@
1
1
  import importlib
2
2
  from typing import Dict, List
3
+ from loguru import logger
3
4
 
4
5
  from langchain_core.language_models import BaseChatModel
5
6
 
@@ -125,7 +126,7 @@ class IntegratedReportGenerator:
125
126
  sections = {}
126
127
 
127
128
  for section in structure:
128
- print(f"Processing section: {section['name']}")
129
+ logger.info(f"Processing section: {section['name']}")
129
130
  section_content = []
130
131
  section_content.append(f"# {section['name']}\n")
131
132
 
@@ -138,7 +139,7 @@ class IntegratedReportGenerator:
138
139
  # Generate a specific search query for this subsection
139
140
  subsection_query = f"{query} {section['name']} {subsection['name']} {subsection['purpose']}"
140
141
 
141
- print(
142
+ logger.info(
142
143
  f"Researching subsection: {subsection['name']} with query: {subsection_query}"
143
144
  )
144
145
 
@@ -975,6 +975,12 @@
975
975
  * @param {string} lastSelectedModel - The last selected model from localStorage or database
976
976
  */
977
977
  function selectModelBasedOnProvider(resetSelectedModel, lastSelectedModel) {
978
+ if (modelInput && modelInput.disabled) {
979
+ // Don't change the model automatically if we've disabled model
980
+ // selection. Then the user won't be able to change it back.
981
+ return;
982
+ }
983
+
978
984
  if (resetSelectedModel) {
979
985
  if (modelInput) {
980
986
  // Try to select last used model first if it's available
@@ -1178,10 +1184,10 @@
1178
1184
  // Load settings from the database
1179
1185
  function loadSettings() {
1180
1186
  console.log('Loading settings from database...');
1181
- let numApiCallsPending = 2;
1187
+ let numApiCallsPending = 1;
1182
1188
 
1183
1189
  // Fetch the current settings from the settings API
1184
- fetch('/research/settings/api/llm', {
1190
+ fetch('/research/settings/api', {
1185
1191
  method: 'GET',
1186
1192
  headers: {
1187
1193
  'Content-Type': 'application/json'
@@ -1199,13 +1205,13 @@
1199
1205
  // If we have a settings object in the response
1200
1206
  if (data && data.settings) {
1201
1207
  // Find the provider and model settings
1202
- const providerSetting = data.settings.value["provider"];
1203
- const modelSetting = data.settings.value["model"];
1204
- const customEndpointUrl = data.settings.value["openai_endpoint.url"];
1208
+ const providerSetting = data.settings["llm.provider"];
1209
+ const modelSetting = data.settings["llm.model"];
1210
+ const customEndpointUrlSetting = data.settings["llm.openai_endpoint.url"];
1205
1211
 
1206
1212
  // Update provider dropdown if we have a valid provider
1207
1213
  if (providerSetting && modelProviderSelect) {
1208
- const providerValue = providerSetting.toUpperCase();
1214
+ const providerValue = providerSetting.value.toUpperCase();
1209
1215
  console.log('Setting provider to:', providerValue);
1210
1216
 
1211
1217
  // Find the matching option in the dropdown
@@ -1234,6 +1240,7 @@
1234
1240
  console.warn(`No matching provider option found for '${providerValue}'`);
1235
1241
  }
1236
1242
  }
1243
+ modelProviderSelect.disabled = !providerSetting.editable;
1237
1244
 
1238
1245
  // Display endpoint container if using custom endpoint
1239
1246
  if (endpointContainer) {
@@ -1243,9 +1250,11 @@
1243
1250
  }
1244
1251
 
1245
1252
  // Update the custom endpoint URl if we have one.
1246
- if (customEndpointUrl && customEndpointInput) {
1247
- console.log('Setting endpoint URL to:', customEndpointUrl);
1248
- customEndpointInput.value = customEndpointUrl;
1253
+ if (customEndpointUrlSetting && customEndpointInput) {
1254
+ const customEndpointUrlValue = customEndpointUrlSetting.value;
1255
+ console.log('Current endpoint URL:', customEndpointUrlValue);
1256
+ customEndpointInput.value = customEndpointUrlValue;
1257
+ customEndpointInput.disabled = !customEndpointUrlSetting.editable;
1249
1258
  }
1250
1259
 
1251
1260
  // Load model options based on the current provider
@@ -1253,7 +1262,7 @@
1253
1262
  updateModelOptionsForProvider(currentProvider, false).then(() => {
1254
1263
  // Update model selection if we have a valid model
1255
1264
  if (modelSetting && modelInput) {
1256
- const modelValue = modelSetting;
1265
+ const modelValue = modelSetting.value;
1257
1266
  console.log('Setting model to:', modelValue);
1258
1267
 
1259
1268
  // Save to localStorage
@@ -1288,9 +1297,52 @@
1288
1297
  hiddenInput.value = modelValue;
1289
1298
  }
1290
1299
  }
1300
+ modelInput.disabled = !modelSetting.editable;
1291
1301
  }
1292
1302
  });
1293
1303
 
1304
+ // Update search engine if we have a valid value
1305
+ const searchEngineSetting = data.settings["search.tool"];
1306
+ if (searchEngineSetting && searchEngineSetting.value && searchEngineInput) {
1307
+ const engineValue = searchEngineSetting.value;
1308
+ console.log('Setting search engine to:', engineValue);
1309
+
1310
+ // Save to localStorage
1311
+ localStorage.setItem('lastUsedSearchEngine', engineValue);
1312
+
1313
+ // Find the engine in our loaded options
1314
+ const matchingEngine = searchEngineOptions.find(e =>
1315
+ e.value === engineValue || e.id === engineValue
1316
+ );
1317
+
1318
+ if (matchingEngine) {
1319
+ console.log('Found matching search engine in options:', matchingEngine);
1320
+
1321
+ // Set the input field value
1322
+ searchEngineInput.value = matchingEngine.label || engineValue;
1323
+ selectedSearchEngineValue = engineValue;
1324
+
1325
+ // Also update hidden input if it exists
1326
+ const hiddenInput = document.getElementById('search_engine_hidden');
1327
+ if (hiddenInput) {
1328
+ hiddenInput.value = engineValue;
1329
+ }
1330
+ } else {
1331
+ // If no matching engine found, just set the raw value
1332
+ console.warn(`No matching search engine found for '${engineValue}'`);
1333
+ searchEngineInput.value = engineValue;
1334
+ selectedSearchEngineValue = engineValue;
1335
+
1336
+ // Also update hidden input if it exists
1337
+ const hiddenInput = document.getElementById('search_engine_hidden');
1338
+ if (hiddenInput) {
1339
+ hiddenInput.value = engineValue;
1340
+ }
1341
+ }
1342
+
1343
+ searchEngineInput.disabled = !searchEngineSetting.editable;
1344
+ }
1345
+
1294
1346
 
1295
1347
  }
1296
1348
 
@@ -1309,83 +1361,6 @@
1309
1361
  numApiCallsPending--;
1310
1362
  isInitializing = (numApiCallsPending === 0);
1311
1363
  });
1312
-
1313
- fetch('/research/settings/api/search.tool', {
1314
- method: 'GET',
1315
- headers: {
1316
- 'Content-Type': 'application/json'
1317
- }
1318
- })
1319
- .then(response => {
1320
- if (!response.ok) {
1321
- throw new Error(`API error: ${response.status}`);
1322
- }
1323
- return response.json();
1324
- })
1325
- .then(data => {
1326
- console.log('Loaded settings from database:', data);
1327
-
1328
- // If we have a settings object in the response
1329
- if (data && data.settings) {
1330
- // Find the provider and model settings
1331
- const searchEngineSetting = data.settings;
1332
-
1333
- // Update search engine if we have a valid value
1334
- if (searchEngineSetting && searchEngineSetting.value && searchEngineInput) {
1335
- const engineValue = searchEngineSetting.value;
1336
- console.log('Setting search engine to:', engineValue);
1337
-
1338
- // Save to localStorage
1339
- localStorage.setItem('lastUsedSearchEngine', engineValue);
1340
-
1341
- // Find the engine in our loaded options
1342
- const matchingEngine = searchEngineOptions.find(e =>
1343
- e.value === engineValue || e.id === engineValue
1344
- );
1345
-
1346
- if (matchingEngine) {
1347
- console.log('Found matching search engine in options:', matchingEngine);
1348
-
1349
- // Set the input field value
1350
- searchEngineInput.value = matchingEngine.label || engineValue;
1351
- selectedSearchEngineValue = engineValue;
1352
-
1353
- // Also update hidden input if it exists
1354
- const hiddenInput = document.getElementById('search_engine_hidden');
1355
- if (hiddenInput) {
1356
- hiddenInput.value = engineValue;
1357
- }
1358
- } else {
1359
- // If no matching engine found, just set the raw value
1360
- console.warn(`No matching search engine found for '${engineValue}'`);
1361
- searchEngineInput.value = engineValue;
1362
- selectedSearchEngineValue = engineValue;
1363
-
1364
- // Also update hidden input if it exists
1365
- const hiddenInput = document.getElementById('search_engine_hidden');
1366
- if (hiddenInput) {
1367
- hiddenInput.value = engineValue;
1368
- }
1369
- }
1370
- }
1371
- }
1372
-
1373
- // If all the calls to the settings API are finished, we're no
1374
- // longer initializing.
1375
- numApiCallsPending--;
1376
- isInitializing = (numApiCallsPending === 0);
1377
-
1378
- })
1379
- .catch(error => {
1380
- console.error('Error loading settings:', error);
1381
-
1382
- // Fallback to localStorage if database fetch fails
1383
- fallbackToLocalStorageSettings();
1384
-
1385
- // Even if there's an error, we're done initializing
1386
- numApiCallsPending--;
1387
- isInitializing = (numApiCallsPending === 0);
1388
- });
1389
1364
  }
1390
1365
 
1391
1366
  // Add a fallback function to use localStorage settings
@@ -2875,7 +2875,7 @@
2875
2875
  console.log(`Models loaded, available options: ${modelOptions.length}`);
2876
2876
 
2877
2877
  // Get current settings from hidden inputs
2878
- const currentProvider = providerHiddenInput.value || 'ollama';
2878
+ const currentProvider = providerHiddenInput.value.toUpperCase() || 'OLLAMA'
2879
2879
  const currentModel = modelHiddenInput.value || 'gemma3:12b';
2880
2880
 
2881
2881
  console.log('Current settings:', { provider: currentProvider, model: currentModel });
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: local-deep-research
3
- Version: 0.5.6
3
+ Version: 0.5.9
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,9 @@
1
- local_deep_research-0.5.6.dist-info/METADATA,sha256=z4f4FzpNHmL7VxtUa1qoLxoMOtJLut99WbwJ7pQPV4o,17676
2
- local_deep_research-0.5.6.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- local_deep_research-0.5.6.dist-info/entry_points.txt,sha256=GcXS501Rjh-P80S8db7hnrQ23mS_Jg27PwpVQVO77as,113
4
- local_deep_research-0.5.6.dist-info/licenses/LICENSE,sha256=Qg2CaTdu6SWnSqk1_JtgBPp_Da-LdqJDhT1Vt1MUc5s,1072
1
+ local_deep_research-0.5.9.dist-info/METADATA,sha256=QF_frBgPAXY7nsZ9TtsBosO2nw9VVvAhjeEOAsp8ndM,17676
2
+ local_deep_research-0.5.9.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ local_deep_research-0.5.9.dist-info/entry_points.txt,sha256=GcXS501Rjh-P80S8db7hnrQ23mS_Jg27PwpVQVO77as,113
4
+ local_deep_research-0.5.9.dist-info/licenses/LICENSE,sha256=Qg2CaTdu6SWnSqk1_JtgBPp_Da-LdqJDhT1Vt1MUc5s,1072
5
5
  local_deep_research/__init__.py,sha256=j1ktf_e9HeXPe86NHibY5aINtZfTSGRTvLNtz9BJZa4,1071
6
- local_deep_research/__version__.py,sha256=CMH34Gt1AqO7z_TqRj94XwohGoVCf8aes0djkqm45mk,22
6
+ local_deep_research/__version__.py,sha256=JXLyhF5WmLgRZBfWGz9zWe2g5ISKSLpn2jp8yLaC-s4,22
7
7
  local_deep_research/advanced_search_system/__init__.py,sha256=sGusMj4eFIrhXR6QbOM16UDKB6aI-iS4IFivKWpMlh0,234
8
8
  local_deep_research/advanced_search_system/answer_decoding/__init__.py,sha256=BmmbIPQnouYyboFD61CDq71fW5On555w7dbt42s9gV4,148
9
9
  local_deep_research/advanced_search_system/answer_decoding/browsecomp_answer_decoder.py,sha256=4FDMP4n_z5DOzVIisH3_kexRqNm1AO3MDe-Md3WtgE0,12856
@@ -70,7 +70,7 @@ local_deep_research/advanced_search_system/strategies/early_stop_constrained_str
70
70
  local_deep_research/advanced_search_system/strategies/entity_aware_source_strategy.py,sha256=PMKaJHPHy0H77leqRi_g85KUY22ro2kOYLjprn_Def4,4931
71
71
  local_deep_research/advanced_search_system/strategies/evidence_based_strategy.py,sha256=cj9NYf-16A9huHrnMEHDtDg6Ea2T3lrfA0ypUrQdOqg,48505
72
72
  local_deep_research/advanced_search_system/strategies/evidence_based_strategy_v2.py,sha256=z2KBZIEOjg_-iREy7mLZAYklWwVTbJeFUBzApmvxmFw,50109
73
- local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.py,sha256=hd81pISc4bIvzFmiWHGWF9lxuJ5dDvcvy7hongT_9bs,21973
73
+ local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.py,sha256=HCJ5xqlLQlzkSvzoUiXf7RWNGo8Qrj1xQNR1U2BkFgA,22039
74
74
  local_deep_research/advanced_search_system/strategies/improved_evidence_based_strategy.py,sha256=EbAhNQg5tDWLlkruXB9zvM5avDuBQMU0GhXtmRCKCPU,29065
75
75
  local_deep_research/advanced_search_system/strategies/iterative_reasoning_strategy.py,sha256=OU5i1foMXupjRJFm3AN2TpqEbGrEmTRqiDekiuw5PbM,29787
76
76
  local_deep_research/advanced_search_system/strategies/iterdrag_strategy.py,sha256=nqGD1COMJXxCTyRABTjSU8bZ8yZ95vHp_91KhjQUB6E,19000
@@ -139,7 +139,7 @@ local_deep_research/config/llm_config.py,sha256=_IIYxtdn9S3ry2OVrBX9ztLNg3frSp2v
139
139
  local_deep_research/config/search_config.py,sha256=DP7SbdcqGPu1yxv3fxtqd1vda5pVY3fH66DyDKuzJio,2209
140
140
  local_deep_research/defaults/.env.template,sha256=_eVCy4d_XwpGXy8n50CG3wH9xx2oqJCFKS7IbqgInDk,491
141
141
  local_deep_research/defaults/__init__.py,sha256=EUnb-wRT2mtv6lqM0hB16KfHJkR7d8JBNCIbEKwu48k,1342
142
- local_deep_research/defaults/default_settings.json,sha256=0dfTFkplu7wnLJQYLBf4wKER55EmYbp_rMAJ5kgmUXc,124250
142
+ local_deep_research/defaults/default_settings.json,sha256=iYnokH7LRJ_05B5QI3TvCXnXQwal_11kLF0a9HfEKho,124250
143
143
  local_deep_research/error_handling/__init__.py,sha256=3kiEhchFP-gDeD_qM3lhtQqeVx7enqIwm_4hBKtohLg,396
144
144
  local_deep_research/error_handling/error_reporter.py,sha256=tPBWUftpw6NWIcoRJJbaGaLApx7CQdcz3AppGDWKmnM,8583
145
145
  local_deep_research/error_handling/report_generator.py,sha256=EQnKC2uENEWNAhOA2swJTxEG5CEwZDTHY4dlM1s4kM0,17303
@@ -159,7 +159,7 @@ local_deep_research/metrics/query_utils.py,sha256=BDQk3F-nmI09mIGbelteCCWxq4oSKK
159
159
  local_deep_research/metrics/search_tracker.py,sha256=nJnLKzXVMRO8YQFYvPBDms0Ba6fMUtyTY-NnTd8TIrs,15266
160
160
  local_deep_research/metrics/token_counter.py,sha256=QmNvJhAKgpzxmBErCZ0pEAjCwgk8IBMt-gXaQRksXCs,43043
161
161
  local_deep_research/migrate_db.py,sha256=-Ql7bC2VmXlWtDOXj7CGVBvBlSk--wHyZCniWJnhC6c,4648
162
- local_deep_research/report_generator.py,sha256=J7Y7_soTAPkIajzbkIAPeq1ziTsXPMMz4Fwl6C-n6Zw,9282
162
+ local_deep_research/report_generator.py,sha256=8nBYTT5cO35B0b6NFsjdroBoBvzSJJa9OsUCtdQPAAg,9320
163
163
  local_deep_research/search_system.py,sha256=BpHhWXj82iVAJajpwyHaYyeBcNKbYY5DG2oxoNDERlo,27194
164
164
  local_deep_research/setup_data_dir.py,sha256=7MJa2MMdDUnktJVHwMpyNL2079-qylpIyyLpVbF5AUY,1134
165
165
  local_deep_research/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -207,9 +207,9 @@ local_deep_research/web/static/js/components/fallback/ui.js,sha256=O4fMeHXodvpFT
207
207
  local_deep_research/web/static/js/components/history.js,sha256=TiE1R1U81L0bOuKhBgmB-9gS-66YNgmi_yIy-rG_5uY,15507
208
208
  local_deep_research/web/static/js/components/logpanel.js,sha256=IiTpKPSEn7KtKT4xh9X6FcMZWfloj5eTDa8Oday2lhs,42808
209
209
  local_deep_research/web/static/js/components/progress.js,sha256=8cydtosQZpdX2MTpYEq9GPARCWV5azKMaRHxYiDvJoM,42542
210
- local_deep_research/web/static/js/components/research.js,sha256=9oGOTpm0J6nO43qPOWQJsWt9ukLSbAC1MV5AegGnp9E,88282
210
+ local_deep_research/web/static/js/components/research.js,sha256=Ry1zr8fais2ELPATNmvBRJ0tNjl8HwQPavBWI5YUsx4,87505
211
211
  local_deep_research/web/static/js/components/results.js,sha256=3kDk0kodglBqIODh_ve0I9ERIZkITz2yB5isUUda-bc,35763
212
- local_deep_research/web/static/js/components/settings.js,sha256=qnRxnx9LdyOpjIEKfb4mJdES9sLkNKvyzxy4OGUqmGQ,169998
212
+ local_deep_research/web/static/js/components/settings.js,sha256=z---x8pu4mHBUrZ7wiY8bdknJKr_iG15vOyPagLFSr8,170011
213
213
  local_deep_research/web/static/js/components/settings_sync.js,sha256=LWDZ2EE8ChCxI5TPmPm9F4rOiYIEzEJxSCE1GLXk-2w,3925
214
214
  local_deep_research/web/static/js/main.js,sha256=z7gJvwL6A7xqAYloen8uoshdOLeRWohM57xsfrCDUuI,8143
215
215
  local_deep_research/web/static/js/research_form.js,sha256=qOZK0z_BE_xx2a1sx5vTjsCTW-ggHES_uj5eunO9Bo8,3632
@@ -264,4 +264,4 @@ local_deep_research/web_search_engines/engines/search_engine_wikipedia.py,sha256
264
264
  local_deep_research/web_search_engines/search_engine_base.py,sha256=sRgtszDM9RqNw_oVdmGk8CmKS_9EJYR-LyE1as53cp8,12401
265
265
  local_deep_research/web_search_engines/search_engine_factory.py,sha256=eMaFup2p4u1nP4fTmjzfLUAl_mUZkoE1mUABBIvNzDM,12095
266
266
  local_deep_research/web_search_engines/search_engines_config.py,sha256=oJ5GL9BhFvWFgmFtvwJ7AZ9o-uPLEfTNhJJouHF40iA,5296
267
- local_deep_research-0.5.6.dist-info/RECORD,,
267
+ local_deep_research-0.5.9.dist-info/RECORD,,