local-deep-research 0.5.5__py3-none-any.whl → 0.5.7__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/__version__.py +1 -1
- local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.py +1 -1
- local_deep_research/web/app.py +3 -3
- local_deep_research/web/static/js/components/research.js +62 -87
- local_deep_research/web/static/js/components/settings.js +1 -1
- {local_deep_research-0.5.5.dist-info → local_deep_research-0.5.7.dist-info}/METADATA +1 -1
- {local_deep_research-0.5.5.dist-info → local_deep_research-0.5.7.dist-info}/RECORD +10 -10
- {local_deep_research-0.5.5.dist-info → local_deep_research-0.5.7.dist-info}/WHEEL +0 -0
- {local_deep_research-0.5.5.dist-info → local_deep_research-0.5.7.dist-info}/entry_points.txt +0 -0
- {local_deep_research-0.5.5.dist-info → local_deep_research-0.5.7.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.5.
|
1
|
+
__version__ = "0.5.7"
|
@@ -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 =
|
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)
|
local_deep_research/web/app.py
CHANGED
@@ -16,9 +16,6 @@ from .models.database import (
|
|
16
16
|
# Ensure data directory exists
|
17
17
|
setup_data_dir()
|
18
18
|
|
19
|
-
# Configure logging with milestone level
|
20
|
-
config_logger("ldr_web")
|
21
|
-
|
22
19
|
# Run schema upgrades if database exists
|
23
20
|
if os.path.exists(DB_PATH):
|
24
21
|
try:
|
@@ -55,6 +52,9 @@ def main():
|
|
55
52
|
Entry point for the web application when run as a command.
|
56
53
|
This function is needed for the package's entry point to work properly.
|
57
54
|
"""
|
55
|
+
# Configure logging with milestone level
|
56
|
+
config_logger("ldr_web")
|
57
|
+
|
58
58
|
# Create the Flask app and SocketIO instance
|
59
59
|
app, socketio = create_app()
|
60
60
|
|
@@ -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 =
|
1187
|
+
let numApiCallsPending = 1;
|
1182
1188
|
|
1183
1189
|
// Fetch the current settings from the settings API
|
1184
|
-
fetch('/research/settings/api
|
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
|
1203
|
-
const modelSetting = data.settings
|
1204
|
-
const
|
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 (
|
1247
|
-
|
1248
|
-
|
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 || '
|
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.
|
3
|
+
Version: 0.5.7
|
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.
|
2
|
-
local_deep_research-0.5.
|
3
|
-
local_deep_research-0.5.
|
4
|
-
local_deep_research-0.5.
|
1
|
+
local_deep_research-0.5.7.dist-info/METADATA,sha256=r1H73kJOSc3nfxSoobAkF9hVN05K8ZQc5tA2rATt5g4,17676
|
2
|
+
local_deep_research-0.5.7.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
local_deep_research-0.5.7.dist-info/entry_points.txt,sha256=GcXS501Rjh-P80S8db7hnrQ23mS_Jg27PwpVQVO77as,113
|
4
|
+
local_deep_research-0.5.7.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=
|
6
|
+
local_deep_research/__version__.py,sha256=KiyyYbyEe0O858kmiWcg1RdmqGUYtk_JqRmc3_Ev2Q8,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=
|
73
|
+
local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.py,sha256=Ex-fWwc_t_-nRRZDaS8QI0m00y1ASbYPP2Cd7EEHGTE,21972
|
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
|
@@ -175,7 +175,7 @@ local_deep_research/utilities/threading_utils.py,sha256=3dwErIOazT6V4HkUFo4BvjRN
|
|
175
175
|
local_deep_research/utilities/url_utils.py,sha256=-GjOVrJCglNCDRs9rePyP1T8d6TeIGwI_nzCA5USPd4,1909
|
176
176
|
local_deep_research/web/__init__.py,sha256=CynnuRxCf9mB0AHeylhF5yVZwdj0H6bxVrZtniw3xmE,44
|
177
177
|
local_deep_research/web/api.py,sha256=jtn6ndV-ghRYqBkxDTz2hR9woQ4yIAtwa13YXa2_d7g,11260
|
178
|
-
local_deep_research/web/app.py,sha256=
|
178
|
+
local_deep_research/web/app.py,sha256=3bBUHXB35AE3-7oxSieF0ceYrQaq5LBTdJUSr8PpcCU,3376
|
179
179
|
local_deep_research/web/app_factory.py,sha256=7o5GM8PUwVzB1sz7PywXLLqw3QkzhZZ18mBPbvZXKbM,9153
|
180
180
|
local_deep_research/web/database/README.md,sha256=eEDLqLIfOBRvc0TFh3J1HrtFbZceYmVgpjS3-oyZ5nI,2861
|
181
181
|
local_deep_research/web/database/migrate_to_ldr_db.py,sha256=RRzITerhjUjlHPTf6GoNgrwa4BpKuj_RAohzcS9ttG0,9919
|
@@ -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=
|
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=
|
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.
|
267
|
+
local_deep_research-0.5.7.dist-info/RECORD,,
|
File without changes
|
{local_deep_research-0.5.5.dist-info → local_deep_research-0.5.7.dist-info}/entry_points.txt
RENAMED
File without changes
|
{local_deep_research-0.5.5.dist-info → local_deep_research-0.5.7.dist-info}/licenses/LICENSE
RENAMED
File without changes
|