local-deep-research 0.3.1__py3-none-any.whl → 0.3.3__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/filters/cross_engine_filter.py +1 -1
- local_deep_research/config/llm_config.py +2 -3
- local_deep_research/defaults/default_settings.json +1 -1
- local_deep_research/web/routes/settings_routes.py +2 -4
- local_deep_research/web/static/js/components/settings.js +8 -4
- local_deep_research-0.3.3.dist-info/METADATA +349 -0
- {local_deep_research-0.3.1.dist-info → local_deep_research-0.3.3.dist-info}/RECORD +11 -11
- local_deep_research-0.3.1.dist-info/METADATA +0 -549
- {local_deep_research-0.3.1.dist-info → local_deep_research-0.3.3.dist-info}/WHEEL +0 -0
- {local_deep_research-0.3.1.dist-info → local_deep_research-0.3.3.dist-info}/entry_points.txt +0 -0
- {local_deep_research-0.3.1.dist-info → local_deep_research-0.3.3.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.3.
|
1
|
+
__version__ = "0.3.3"
|
@@ -31,7 +31,7 @@ class CrossEngineFilter(BaseFilter):
|
|
31
31
|
super().__init__(model)
|
32
32
|
# Get max_results from database settings if not provided
|
33
33
|
if max_results is None:
|
34
|
-
max_results = get_db_setting("search.cross_engine_max_results", 100)
|
34
|
+
max_results = int(get_db_setting("search.cross_engine_max_results", 100))
|
35
35
|
self.max_results = max_results
|
36
36
|
self.default_reorder = default_reorder
|
37
37
|
self.default_reindex = default_reindex
|
@@ -3,6 +3,7 @@ import os
|
|
3
3
|
|
4
4
|
from langchain_anthropic import ChatAnthropic
|
5
5
|
from langchain_community.llms import VLLM
|
6
|
+
from langchain_core.language_models import FakeListChatModel
|
6
7
|
from langchain_ollama import ChatOllama
|
7
8
|
from langchain_openai import ChatOpenAI
|
8
9
|
|
@@ -248,9 +249,7 @@ def get_llm(model_name=None, temperature=None, provider=None, openai_endpoint_ur
|
|
248
249
|
|
249
250
|
def get_fallback_model(temperature=None):
|
250
251
|
"""Create a dummy model for when no providers are available"""
|
251
|
-
|
252
|
-
|
253
|
-
return FakeListLLM(
|
252
|
+
return FakeListChatModel(
|
254
253
|
responses=[
|
255
254
|
"No language models are available. Please install Ollama or set up API keys."
|
256
255
|
]
|
@@ -19,6 +19,7 @@ from flask import (
|
|
19
19
|
from flask_wtf.csrf import generate_csrf
|
20
20
|
from sqlalchemy.orm import Session
|
21
21
|
|
22
|
+
from ...utilities.db_utils import get_db_setting
|
22
23
|
from ..database.models import Setting, SettingType
|
23
24
|
from ..services.settings_service import (
|
24
25
|
create_or_update_setting,
|
@@ -666,10 +667,7 @@ def api_get_available_models():
|
|
666
667
|
try:
|
667
668
|
current_app.logger.info("Attempting to connect to Ollama API")
|
668
669
|
|
669
|
-
base_url =
|
670
|
-
"OLLAMA_BASE_URL",
|
671
|
-
"http://localhost:11434",
|
672
|
-
)
|
670
|
+
base_url = get_db_setting("llm.ollama.url", "http://localhost:11434")
|
673
671
|
ollama_response = requests.get(f"{base_url}/api/tags", timeout=5)
|
674
672
|
|
675
673
|
current_app.logger.debug(
|
@@ -53,7 +53,8 @@
|
|
53
53
|
class="custom-dropdown-input"
|
54
54
|
placeholder="${params.placeholder}"
|
55
55
|
autocomplete="off"
|
56
|
-
aria-haspopup="listbox"
|
56
|
+
aria-haspopup="listbox"
|
57
|
+
${params.disabled ? "disabled" : ""}>
|
57
58
|
<!-- Hidden input that will be included in form submission -->
|
58
59
|
<input type="hidden" name="${params.input_id}" id="${params.input_id}_hidden" value="">
|
59
60
|
<div class="custom-dropdown-list" id="${params.dropdown_id}-list"></div>
|
@@ -1475,7 +1476,8 @@
|
|
1475
1476
|
help_text: setting.description || null,
|
1476
1477
|
allow_custom: false,
|
1477
1478
|
show_refresh: true, // Set to true for provider
|
1478
|
-
data_setting_key: setting.key
|
1479
|
+
data_setting_key: setting.key,
|
1480
|
+
disabled: !setting.editable
|
1479
1481
|
};
|
1480
1482
|
inputElement = renderCustomDropdownHTML(dropdownParams);
|
1481
1483
|
} else if (setting.key === 'search.tool') {
|
@@ -1487,7 +1489,8 @@
|
|
1487
1489
|
help_text: setting.description || null,
|
1488
1490
|
allow_custom: false,
|
1489
1491
|
show_refresh: false, // No refresh for search tool
|
1490
|
-
data_setting_key: setting.key
|
1492
|
+
data_setting_key: setting.key,
|
1493
|
+
disabled: !setting.editable
|
1491
1494
|
};
|
1492
1495
|
inputElement = renderCustomDropdownHTML(dropdownParams);
|
1493
1496
|
} else if (setting.key === 'llm.model') { // ADD THIS ELSE IF
|
@@ -1501,7 +1504,8 @@
|
|
1501
1504
|
allow_custom: true, // Allow custom for model
|
1502
1505
|
show_refresh: true, // Show refresh for model
|
1503
1506
|
refresh_aria_label: "Refresh model list",
|
1504
|
-
data_setting_key: setting.key
|
1507
|
+
data_setting_key: setting.key,
|
1508
|
+
disabled: !setting.editable
|
1505
1509
|
};
|
1506
1510
|
inputElement = renderCustomDropdownHTML(dropdownParams);
|
1507
1511
|
} else {
|
@@ -0,0 +1,349 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: local-deep-research
|
3
|
+
Version: 0.3.3
|
4
|
+
Summary: AI-powered research assistant with deep, iterative analysis using LLMs and web searches
|
5
|
+
Author-Email: LearningCircuit <185559241+LearningCircuit@users.noreply.github.com>, HashedViking <6432677+HashedViking@users.noreply.github.com>
|
6
|
+
License: MIT License
|
7
|
+
|
8
|
+
Copyright (c) 2025 LearningCircuit
|
9
|
+
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
12
|
+
in the Software without restriction, including without limitation the rights
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
15
|
+
furnished to do so, subject to the following conditions:
|
16
|
+
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
18
|
+
copies or substantial portions of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
+
SOFTWARE.
|
27
|
+
|
28
|
+
Classifier: Programming Language :: Python :: 3
|
29
|
+
Classifier: License :: OSI Approved :: MIT License
|
30
|
+
Classifier: Operating System :: OS Independent
|
31
|
+
Project-URL: Homepage, https://github.com/LearningCircuit/local-deep-research
|
32
|
+
Project-URL: Bug Tracker, https://github.com/LearningCircuit/local-deep-research/issues
|
33
|
+
Requires-Python: >=3.10
|
34
|
+
Requires-Dist: langchain>=0.3.18
|
35
|
+
Requires-Dist: langchain-community>=0.3.17
|
36
|
+
Requires-Dist: langchain-core>=0.3.34
|
37
|
+
Requires-Dist: langchain-ollama>=0.2.3
|
38
|
+
Requires-Dist: langchain-openai>=0.3.5
|
39
|
+
Requires-Dist: langchain_anthropic>=0.3.7
|
40
|
+
Requires-Dist: duckduckgo_search>=7.3.2
|
41
|
+
Requires-Dist: python-dateutil>=2.9.0
|
42
|
+
Requires-Dist: typing_extensions>=4.12.2
|
43
|
+
Requires-Dist: justext
|
44
|
+
Requires-Dist: playwright
|
45
|
+
Requires-Dist: beautifulsoup4
|
46
|
+
Requires-Dist: flask>=3.1.0
|
47
|
+
Requires-Dist: flask-cors>=3.0.10
|
48
|
+
Requires-Dist: flask-socketio>=5.1.1
|
49
|
+
Requires-Dist: sqlalchemy>=1.4.23
|
50
|
+
Requires-Dist: wikipedia
|
51
|
+
Requires-Dist: arxiv>=1.4.3
|
52
|
+
Requires-Dist: pypdf
|
53
|
+
Requires-Dist: sentence-transformers
|
54
|
+
Requires-Dist: faiss-cpu
|
55
|
+
Requires-Dist: pydantic>=2.0.0
|
56
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
57
|
+
Requires-Dist: toml>=0.10.2
|
58
|
+
Requires-Dist: platformdirs>=3.0.0
|
59
|
+
Requires-Dist: dynaconf
|
60
|
+
Requires-Dist: requests>=2.28.0
|
61
|
+
Requires-Dist: tiktoken>=0.4.0
|
62
|
+
Requires-Dist: xmltodict>=0.13.0
|
63
|
+
Requires-Dist: lxml>=4.9.2
|
64
|
+
Requires-Dist: pdfplumber>=0.9.0
|
65
|
+
Requires-Dist: unstructured>=0.10.0
|
66
|
+
Requires-Dist: google-search-results
|
67
|
+
Requires-Dist: importlib-resources>=6.5.2
|
68
|
+
Requires-Dist: setuptools>=78.1.0
|
69
|
+
Requires-Dist: flask-wtf>=1.2.2
|
70
|
+
Description-Content-Type: text/markdown
|
71
|
+
|
72
|
+
# Local Deep Research
|
73
|
+
|
74
|
+
<div align="center">
|
75
|
+
|
76
|
+
[](https://github.com/LearningCircuit/local-deep-research/stargazers)
|
77
|
+
[](LICENSE)
|
78
|
+
[](https://discord.gg/ttcqQeFcJ3)
|
79
|
+
[](https://www.reddit.com/r/LocalDeepResearch/)
|
80
|
+
|
81
|
+
*AI-powered research assistant that performs deep, iterative analysis using multiple LLMs and web searches*
|
82
|
+
|
83
|
+
<a href="https://www.youtube.com/watch?v=0ISreg9q0p0">
|
84
|
+
<img src="https://img.youtube.com/vi/0ISreg9q0p0/0.jpg" alt="Local Deep Research Demo" width="500">
|
85
|
+
</a>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
## 📋 Overview
|
90
|
+
|
91
|
+
Local Deep Research is a powerful AI research assistant that:
|
92
|
+
|
93
|
+
1. **Performs iterative, multi-source research** on any topic
|
94
|
+
2. **Creates comprehensive reports or quick summaries** with proper citations
|
95
|
+
3. **Runs locally** for complete privacy when using local LLMs
|
96
|
+
4. **Searches across multiple sources** including academic databases & the web
|
97
|
+
5. **Processes your own documents** with vector search (RAG)
|
98
|
+
6. **Optimized for speed** with parallel search processing
|
99
|
+
|
100
|
+
Local Deep Research combines the power of large language models with intelligent search strategies to provide well-researched, properly cited answers to complex questions. It can process queries in just seconds with the Quick Summary option, or create detailed reports with proper section organization for more comprehensive analysis.
|
101
|
+
|
102
|
+
## ⚡ Quick Start (Recommended)
|
103
|
+
|
104
|
+
```bash
|
105
|
+
# 1. Install
|
106
|
+
pip install local-deep-research
|
107
|
+
|
108
|
+
# 2. Setup SearXNG for best results
|
109
|
+
docker pull searxng/searxng
|
110
|
+
docker run -d -p 8080:8080 --name searxng searxng/searxng
|
111
|
+
docker start searxng (required after every reboot)
|
112
|
+
|
113
|
+
# 3. Install Ollama and pull a model
|
114
|
+
# Download from https://ollama.ai and run:
|
115
|
+
ollama pull gemma3:12b
|
116
|
+
|
117
|
+
# 4. Start the web interface
|
118
|
+
python -m local_deep_research.web.app
|
119
|
+
```
|
120
|
+
|
121
|
+
Then visit `http://127.0.0.1:5000` to start researching!
|
122
|
+
|
123
|
+
### Alternative Installation Options
|
124
|
+
|
125
|
+
**Windows Installer**: Download the [Windows Installer](https://github.com/LearningCircuit/local-deep-research/releases/download/v0.1.0/LocalDeepResearch_Setup.exe) for one-click setup.
|
126
|
+
|
127
|
+
**Docker**: Run with Docker using:
|
128
|
+
```bash
|
129
|
+
docker run --network=host \
|
130
|
+
local-deep-research
|
131
|
+
```
|
132
|
+
|
133
|
+
**Command Line**: Alternatively, use the CLI version with:
|
134
|
+
```bash
|
135
|
+
python -m local_deep_research.main
|
136
|
+
```
|
137
|
+
|
138
|
+
## 🔍 Research Capabilities
|
139
|
+
|
140
|
+
### Two Research Modes
|
141
|
+
|
142
|
+
- **Quick Summary**: Fast results (30s-3min) with key information and proper citations
|
143
|
+
- Perfect for rapid exploration and answering straightforward questions
|
144
|
+
- Supports multiple search engines in parallel for maximum efficiency
|
145
|
+
- Tables and structured information can be included when relevant
|
146
|
+
|
147
|
+
- **Detailed Report**: Comprehensive analysis with structured sections, table of contents, and in-depth exploration
|
148
|
+
- Creates professional-grade reports with proper organization
|
149
|
+
- Conducts separate research for each section to ensure comprehensive coverage
|
150
|
+
- Integrates information across sections for a cohesive analysis
|
151
|
+
- Includes proper citations and reference tracking
|
152
|
+
|
153
|
+
### Performance Optimization
|
154
|
+
|
155
|
+
- **Use Direct SearXNG**: For maximum speed (bypasses LLM calls needed for engine selection)
|
156
|
+
- **Adjust Iteration Depth**:
|
157
|
+
- 1 iteration: Quick factual questions (~30 seconds)
|
158
|
+
- 2-3 iterations: Complex topics requiring deeper exploration (2-3 minutes)
|
159
|
+
- 3-5 iterations: Comprehensive research with follow-up investigation (5+ minutes)
|
160
|
+
- **Choose Appropriate Models**:
|
161
|
+
- 12B-30B parameter models offer good balance of quality and speed
|
162
|
+
- For complex research, larger models may provide better synthesis
|
163
|
+
- **For Detailed Reports**: Expect multiple research cycles (one per section) and longer processing times
|
164
|
+
|
165
|
+
### Multi-Source Integration
|
166
|
+
|
167
|
+
- **Auto-Engine Selection**: The system intelligently selects the most appropriate search engines for your query
|
168
|
+
- **Academic Sources**: Direct access to Wikipedia, arXiv, PubMed, Semantic Scholar, and more
|
169
|
+
- **Web Search**: Via SearXNG, Brave Search, SerpAPI (for Google results), and more
|
170
|
+
- **Local Document Search**: Search through your private document collections with vector embeddings
|
171
|
+
- **Cross-Engine Filtering**: Smart result ranking across search engines for better information quality
|
172
|
+
|
173
|
+
## 🤖 LLM Support
|
174
|
+
|
175
|
+
Local Deep Research works with both local and cloud LLMs:
|
176
|
+
|
177
|
+
### Local Models (via Ollama)
|
178
|
+
|
179
|
+
Local models provide complete privacy and don't require API keys or internet connection for the LLM component (only search queries go online).
|
180
|
+
|
181
|
+
```bash
|
182
|
+
# Install Ollama from https://ollama.ai
|
183
|
+
ollama pull gemma3:12b # Recommended model
|
184
|
+
```
|
185
|
+
|
186
|
+
Recommended local models:
|
187
|
+
- **Gemma 3 (12B)** - Great balance of quality and speed
|
188
|
+
- **Mistral (7B/8x7B)** - Fast performance on most hardware
|
189
|
+
- **Llama 3 (8B/70B)** - Good performance across various tasks
|
190
|
+
|
191
|
+
### Cloud Models
|
192
|
+
|
193
|
+
Cloud models can provide higher quality results for complex research tasks:
|
194
|
+
|
195
|
+
API keys can be configured directly through the web interface in the settings panel or via environment variables:
|
196
|
+
|
197
|
+
```bash
|
198
|
+
# Cloud LLM providers - add to your .env file if not using the web UI
|
199
|
+
LDR_LLM_ANTHROPIC_API_KEY=your-api-key-here # For Claude models
|
200
|
+
LDR_LLM_OPENAI_API_KEY=your-openai-key-here # For GPT models
|
201
|
+
LDR_LLM_OPENAI_ENDPOINT_API_KEY=your-key-here # For OpenRouter or similar services
|
202
|
+
|
203
|
+
# Set your preferred provider and model
|
204
|
+
LDR_LLM_PROVIDER=ollama # Options: ollama, openai, anthropic, etc.
|
205
|
+
LDR_LLM_MODEL=gemma3:12b # Model name to use
|
206
|
+
```
|
207
|
+
|
208
|
+
### Supported Providers
|
209
|
+
|
210
|
+
| Provider | Type | Setup | Models |
|
211
|
+
|----------|------|---------|--------|
|
212
|
+
| `OLLAMA` | Local | Install from [ollama.ai](https://ollama.ai) | Mistral, Llama, Gemma, etc. |
|
213
|
+
| `OPENAI` | Cloud | API key required | GPT-3.5, GPT-4, GPT-4o |
|
214
|
+
| `ANTHROPIC` | Cloud | API key required | Claude 3 Opus, Sonnet, Haiku |
|
215
|
+
| `OPENAI_ENDPOINT` | Cloud | API key required | Any OpenAI-compatible API |
|
216
|
+
| `VLLM` | Local | Requires GPU setup | Any supported by vLLM |
|
217
|
+
| `LMSTUDIO` | Local | Use LM Studio server | Models from LM Studio |
|
218
|
+
| `LLAMACPP` | Local | Configure model path | GGUF model formats |
|
219
|
+
|
220
|
+
You can easily switch between models in the web interface or via environment variables without reinstalling.
|
221
|
+
|
222
|
+
## 🌐 Search Engines
|
223
|
+
|
224
|
+
The system leverages multiple search engines to find the most relevant information for your queries.
|
225
|
+
|
226
|
+
### Core Free Engines (No API Key Required)
|
227
|
+
|
228
|
+
- **`auto`**: Intelligently selects the best engines based on your query (recommended)
|
229
|
+
- **`wikipedia`**: General knowledge, facts, and encyclopedic information
|
230
|
+
- **`arxiv`**: Scientific papers and academic research
|
231
|
+
- **`pubmed`**: Medical and biomedical research and journals
|
232
|
+
- **`semantic_scholar`**: Academic literature across all fields
|
233
|
+
- **`github`**: Code repositories, documentation, and technical discussions
|
234
|
+
- **`searxng`**: Comprehensive web search via local SearXNG instance
|
235
|
+
- **`wayback`**: Historical web content from Internet Archive
|
236
|
+
|
237
|
+
### Paid Engines (API Key Required)
|
238
|
+
|
239
|
+
For enhanced web search capabilities, you can configure these additional engines through the settings interface or via environment variables:
|
240
|
+
|
241
|
+
```bash
|
242
|
+
# Search API keys (if not using the web UI)
|
243
|
+
SERP_API_KEY=your-key-here # Google results via SerpAPI
|
244
|
+
GOOGLE_PSE_API_KEY=your-key-here # Google Programmable Search
|
245
|
+
BRAVE_API_KEY=your-key-here # Brave Search
|
246
|
+
```
|
247
|
+
|
248
|
+
### Search Engine Comparison
|
249
|
+
|
250
|
+
| Engine | Specialization | Privacy | Speed | Results Quality |
|
251
|
+
|--------|----------------|---------|-------|-----------------|
|
252
|
+
| SearXNG | General web | ★★★★★ | ★★★★★ | ★★★★½ |
|
253
|
+
| Wikipedia | Facts & concepts | ★★★★★ | ★★★★☆ | ★★★★☆ |
|
254
|
+
| arXiv | Scientific research | ★★★★★ | ★★★★☆ | ★★★★★ |
|
255
|
+
| PubMed | Medical research | ★★★★★ | ★★★★☆ | ★★★★★ |
|
256
|
+
| GitHub | Code & tech | ★★★★★ | ★★★☆☆ | ★★★★☆ |
|
257
|
+
| SerpAPI | Web (Google) | ★★☆☆☆ | ★★★★☆ | ★★★★★ |
|
258
|
+
| Brave | Web (privacy-focused) | ★★★★☆ | ★★★★☆ | ★★★★☆ |
|
259
|
+
|
260
|
+
## 📚 Local Document Search (RAG)
|
261
|
+
|
262
|
+
Local Deep Research includes powerful Retrieval Augmented Generation (RAG) capabilities, allowing you to search and analyze your own private documents using vector embeddings:
|
263
|
+
|
264
|
+
### Supported Document Types
|
265
|
+
|
266
|
+
- PDF files
|
267
|
+
- Markdown (.md)
|
268
|
+
- Plain text (.txt)
|
269
|
+
- Microsoft Word (.docx, .doc)
|
270
|
+
- Excel spreadsheets (.xlsx, .xls)
|
271
|
+
- CSV files
|
272
|
+
- And more
|
273
|
+
|
274
|
+
### Using Document Collections
|
275
|
+
|
276
|
+
You can use your documents in research via:
|
277
|
+
- Auto-selection (when relevant to query)
|
278
|
+
- Direct collection selection: `tool = "project_docs"`
|
279
|
+
- All collections: `tool = "local_all"`
|
280
|
+
- Query syntax: `collection:project_docs your query`
|
281
|
+
|
282
|
+
This allows you to integrate your private knowledge base with web search results for comprehensive research that includes your own documents and data.
|
283
|
+
|
284
|
+
## 🛠️ Advanced Configuration
|
285
|
+
|
286
|
+
### Web Interface
|
287
|
+
|
288
|
+
The easiest way to configure Local Deep Research is through the web interface, which provides:
|
289
|
+
- Complete settings management
|
290
|
+
- Model selection
|
291
|
+
- Search engine configuration
|
292
|
+
- Research parameter adjustment
|
293
|
+
- Local document collection setup
|
294
|
+
|
295
|
+
### Configuration Documentation
|
296
|
+
|
297
|
+
For detailed configuration options, see our guides:
|
298
|
+
- [Environment Variables Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/env_configuration.md)
|
299
|
+
- [SearXNG Setup Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/SearXNG-Setup.md)
|
300
|
+
- [Docker Usage Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-usage-readme.md)
|
301
|
+
- [Docker Compose Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-compose-guide.md)
|
302
|
+
|
303
|
+
### Programmatic Access
|
304
|
+
|
305
|
+
Use the Python API for integration with other tools or scripts:
|
306
|
+
|
307
|
+
```python
|
308
|
+
from local_deep_research import quick_summary, generate_report
|
309
|
+
|
310
|
+
# Quick research with custom parameters
|
311
|
+
results = quick_summary(
|
312
|
+
query="advances in fusion energy",
|
313
|
+
search_tool="auto",
|
314
|
+
iterations=1,
|
315
|
+
questions_per_iteration=2,
|
316
|
+
max_results=30,
|
317
|
+
temperature=0.7
|
318
|
+
)
|
319
|
+
print(results["summary"])
|
320
|
+
```
|
321
|
+
|
322
|
+
For more examples, see the [programmatic access tutorial](https://github.com/LearningCircuit/local-deep-research/blob/main/examples/programmatic_access.ipynb).
|
323
|
+
|
324
|
+
## 📊 Examples & Documentation
|
325
|
+
|
326
|
+
For more information and examples of what Local Deep Research can produce:
|
327
|
+
|
328
|
+
- [Example Outputs](https://github.com/LearningCircuit/local-deep-research/tree/main/examples)
|
329
|
+
- [Documentation](https://github.com/LearningCircuit/local-deep-research/tree/main/docs)
|
330
|
+
- [Wiki](https://github.com/LearningCircuit/local-deep-research/wiki)
|
331
|
+
|
332
|
+
## 🤝 Community & Support
|
333
|
+
|
334
|
+
- [Discord](https://discord.gg/ttcqQeFcJ3): Discuss features, get help, and share research techniques
|
335
|
+
- [Reddit](https://www.reddit.com/r/LocalDeepResearch/): Announcements, updates, and community showcase
|
336
|
+
- [GitHub Issues](https://github.com/LearningCircuit/local-deep-research/issues): Bug reports and feature requests
|
337
|
+
|
338
|
+
## 📄 License & Acknowledgments
|
339
|
+
|
340
|
+
This project is licensed under the MIT License.
|
341
|
+
|
342
|
+
Built with powerful open-source tools:
|
343
|
+
- [LangChain](https://github.com/hwchase17/langchain) framework for LLM integration
|
344
|
+
- [Ollama](https://ollama.ai) for local AI model management
|
345
|
+
- [SearXNG](https://searxng.org/) for privacy-focused web search
|
346
|
+
- [FAISS](https://github.com/facebookresearch/faiss) for vector similarity search
|
347
|
+
- [justext](https://github.com/miso-belica/justext) and [Playwright](https://playwright.dev) for web content analysis
|
348
|
+
|
349
|
+
> **Support Free Knowledge:** If you frequently use the search engines in this tool, please consider making a donation to organizations like [Wikipedia](https://donate.wikimedia.org), [arXiv](https://arxiv.org/about/give), or [PubMed](https://www.nlm.nih.gov/pubs/donations/donations.html).
|
@@ -1,14 +1,14 @@
|
|
1
|
-
local_deep_research-0.3.
|
2
|
-
local_deep_research-0.3.
|
3
|
-
local_deep_research-0.3.
|
4
|
-
local_deep_research-0.3.
|
1
|
+
local_deep_research-0.3.3.dist-info/METADATA,sha256=ug24xKKLnOjOBSXxtJWZkAmRvrKxTCMHZanBwtNilGY,15340
|
2
|
+
local_deep_research-0.3.3.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
local_deep_research-0.3.3.dist-info/entry_points.txt,sha256=GcXS501Rjh-P80S8db7hnrQ23mS_Jg27PwpVQVO77as,113
|
4
|
+
local_deep_research-0.3.3.dist-info/licenses/LICENSE,sha256=Qg2CaTdu6SWnSqk1_JtgBPp_Da-LdqJDhT1Vt1MUc5s,1072
|
5
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=
|
7
|
+
local_deep_research/__version__.py,sha256=8KcCYTXH99C2-gCLuPILJvtT9YftRWJsartIx6TQ2ZY,22
|
8
8
|
local_deep_research/advanced_search_system/__init__.py,sha256=sGusMj4eFIrhXR6QbOM16UDKB6aI-iS4IFivKWpMlh0,234
|
9
9
|
local_deep_research/advanced_search_system/filters/__init__.py,sha256=2dXrV4skcVHI2Lb3BSL2Ajq0rnLeSw7kc1MbIynMxa4,190
|
10
10
|
local_deep_research/advanced_search_system/filters/base_filter.py,sha256=dFNQ7U2dj4bf3voT73YhcG-w9eW-BTlc4F9kstFcETY,969
|
11
|
-
local_deep_research/advanced_search_system/filters/cross_engine_filter.py,sha256=
|
11
|
+
local_deep_research/advanced_search_system/filters/cross_engine_filter.py,sha256=HzhlIrtQlMEPMIibW2ySzMB8aXV2hQBNfCWRo_AJJpM,8009
|
12
12
|
local_deep_research/advanced_search_system/findings/base_findings.py,sha256=tTVEQZeGuTdJ1tDF8QAkiS5pWest8_lmbq3Oq5EPGeY,2052
|
13
13
|
local_deep_research/advanced_search_system/findings/repository.py,sha256=nIdF114IaSNLjnjetbXE8s8C69djik3lywOiFvFI4Lk,19804
|
14
14
|
local_deep_research/advanced_search_system/knowledge/__init__.py,sha256=9zjQkdmomZCgZZP45fqw0E8UVpBjkzkyW7RpY0f8gY8,34
|
@@ -36,11 +36,11 @@ local_deep_research/api/research_functions.py,sha256=SItLEuib94AXrhMsgmYDtykGrVm
|
|
36
36
|
local_deep_research/app.py,sha256=U_92UX0dpVAQoaXciVNy_By_AyDEWGlXSeTwFpohALQ,155
|
37
37
|
local_deep_research/citation_handler.py,sha256=MZVd6xl7g3xrWauFBPuVIC36z8onc-zQb8xI4dQXxsU,4307
|
38
38
|
local_deep_research/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
|
-
local_deep_research/config/llm_config.py,sha256=
|
39
|
+
local_deep_research/config/llm_config.py,sha256=r4ubJaNV3F5gLCpmpcNeCINH-ce_F6iEVO20QEjLGcY,14751
|
40
40
|
local_deep_research/config/search_config.py,sha256=ruryPSS4Wy9-xi_02c-98KLKaELeLnZ10pnCpc0-ogg,2171
|
41
41
|
local_deep_research/defaults/.env.template,sha256=_eVCy4d_XwpGXy8n50CG3wH9xx2oqJCFKS7IbqgInDk,491
|
42
42
|
local_deep_research/defaults/__init__.py,sha256=C_0t0uZmtrVB4rM9NM9Wx8PJU5kFcT-qOHvws5W2iOg,1352
|
43
|
-
local_deep_research/defaults/default_settings.json,sha256=
|
43
|
+
local_deep_research/defaults/default_settings.json,sha256=1UeT79JjgvZwV2KRSpm9KDIeLHKsUlwJSnx6V22maAw,119769
|
44
44
|
local_deep_research/main.py,sha256=umGmaQmW7bpx27wUAgSNjNr4oSHV6mDX5hoyfb22HEY,7033
|
45
45
|
local_deep_research/migrate_db.py,sha256=S1h6Bv0OJdRW4BaH7MIMrUXBRV_yqgH2T6LVOZKTQjI,4634
|
46
46
|
local_deep_research/report_generator.py,sha256=-G3KDEbsuU3PdxDfuo5v28DIX7RE1yJCCBU2KgRbNzI,9084
|
@@ -66,7 +66,7 @@ local_deep_research/web/models/settings.py,sha256=rXBI9vY5k3ndR8dPd3fZJy-6HwYltQ
|
|
66
66
|
local_deep_research/web/routes/api_routes.py,sha256=S0UdCmfm0v1GEM4UiSbI0PE3xUOxiGaYFR2ZOE0256U,19075
|
67
67
|
local_deep_research/web/routes/history_routes.py,sha256=6a_8nX349viuvi1zP5S7BaPPpAh133eTi1NVWO545A8,12622
|
68
68
|
local_deep_research/web/routes/research_routes.py,sha256=JlzaP1z-7XAP3E0nkEjLIfYj_NKf5qDcrjxBmUouAhM,23492
|
69
|
-
local_deep_research/web/routes/settings_routes.py,sha256=
|
69
|
+
local_deep_research/web/routes/settings_routes.py,sha256=DkG0JzYQZHzbMoJRxcEreHHYTbzwhhpSvIUHmEMYQAw,49227
|
70
70
|
local_deep_research/web/services/research_service.py,sha256=vs_pWuv56rG2atgSamlDK4MdxpWTxbBVf3rHztr6y2A,39488
|
71
71
|
local_deep_research/web/services/resource_service.py,sha256=yKgOC6GEOmHqRoGzwf52e19UaGCCS1DbDbOIXgWGvGc,4378
|
72
72
|
local_deep_research/web/services/settings_manager.py,sha256=lHc0Arh9RR4D_Dubj6OxtlZw7MvHtdY8Db9p5LnX_ac,16376
|
@@ -84,7 +84,7 @@ local_deep_research/web/static/js/components/logpanel.js,sha256=bRYkOf-BRTAHrHx9
|
|
84
84
|
local_deep_research/web/static/js/components/progress.js,sha256=aTvtyZDQMkjyhqy62icuZuJ7Khyujgust6fpQFcRABk,41570
|
85
85
|
local_deep_research/web/static/js/components/research.js,sha256=LQmZNqRrxkqa61pGaXHLiHGh7SNiq5XNMqfGMKCRDzM,81074
|
86
86
|
local_deep_research/web/static/js/components/results.js,sha256=7fL18Yn0DwAjuelXvz-UlbDiLCFk-_UEEeqEjaDEVBA,32314
|
87
|
-
local_deep_research/web/static/js/components/settings.js,sha256=
|
87
|
+
local_deep_research/web/static/js/components/settings.js,sha256=XRjA62jfaTBAH4YwAMbVbtgJUm6KI87bxVP4E0fWu7E,168497
|
88
88
|
local_deep_research/web/static/js/components/settings_sync.js,sha256=LWDZ2EE8ChCxI5TPmPm9F4rOiYIEzEJxSCE1GLXk-2w,3925
|
89
89
|
local_deep_research/web/static/js/main.js,sha256=NHOcEVytPCvF5tz3yPWg8Qu5ghVs5-GWKmpaKB87oi4,8440
|
90
90
|
local_deep_research/web/static/js/research_form.js,sha256=qOZK0z_BE_xx2a1sx5vTjsCTW-ggHES_uj5eunO9Bo8,3632
|
@@ -132,4 +132,4 @@ local_deep_research/web_search_engines/engines/search_engine_wikipedia.py,sha256
|
|
132
132
|
local_deep_research/web_search_engines/search_engine_base.py,sha256=PLU_sAWhWKTOQWcv32GINuhLdIwB0sEQy-pp9oG9Ggo,9835
|
133
133
|
local_deep_research/web_search_engines/search_engine_factory.py,sha256=DghAkQvLKRJYl5xb9AUjUv7ydAQ4rPi-TvzrmqdyGxE,10890
|
134
134
|
local_deep_research/web_search_engines/search_engines_config.py,sha256=rgKo3UQhXov_4QxPcdzMqnAfJc5a6tGXtfnjIzKeHdQ,4584
|
135
|
-
local_deep_research-0.3.
|
135
|
+
local_deep_research-0.3.3.dist-info/RECORD,,
|
@@ -1,549 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: local-deep-research
|
3
|
-
Version: 0.3.1
|
4
|
-
Summary: AI-powered research assistant with deep, iterative analysis using LLMs and web searches
|
5
|
-
Author-Email: LearningCircuit <185559241+LearningCircuit@users.noreply.github.com>, HashedViking <6432677+HashedViking@users.noreply.github.com>
|
6
|
-
License: MIT License
|
7
|
-
|
8
|
-
Copyright (c) 2025 LearningCircuit
|
9
|
-
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
12
|
-
in the Software without restriction, including without limitation the rights
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
15
|
-
furnished to do so, subject to the following conditions:
|
16
|
-
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
18
|
-
copies or substantial portions of the Software.
|
19
|
-
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
-
SOFTWARE.
|
27
|
-
|
28
|
-
Classifier: Programming Language :: Python :: 3
|
29
|
-
Classifier: License :: OSI Approved :: MIT License
|
30
|
-
Classifier: Operating System :: OS Independent
|
31
|
-
Project-URL: Homepage, https://github.com/LearningCircuit/local-deep-research
|
32
|
-
Project-URL: Bug Tracker, https://github.com/LearningCircuit/local-deep-research/issues
|
33
|
-
Requires-Python: >=3.10
|
34
|
-
Requires-Dist: langchain>=0.3.18
|
35
|
-
Requires-Dist: langchain-community>=0.3.17
|
36
|
-
Requires-Dist: langchain-core>=0.3.34
|
37
|
-
Requires-Dist: langchain-ollama>=0.2.3
|
38
|
-
Requires-Dist: langchain-openai>=0.3.5
|
39
|
-
Requires-Dist: langchain_anthropic>=0.3.7
|
40
|
-
Requires-Dist: duckduckgo_search>=7.3.2
|
41
|
-
Requires-Dist: python-dateutil>=2.9.0
|
42
|
-
Requires-Dist: typing_extensions>=4.12.2
|
43
|
-
Requires-Dist: justext
|
44
|
-
Requires-Dist: playwright
|
45
|
-
Requires-Dist: beautifulsoup4
|
46
|
-
Requires-Dist: flask>=3.1.0
|
47
|
-
Requires-Dist: flask-cors>=3.0.10
|
48
|
-
Requires-Dist: flask-socketio>=5.1.1
|
49
|
-
Requires-Dist: sqlalchemy>=1.4.23
|
50
|
-
Requires-Dist: wikipedia
|
51
|
-
Requires-Dist: arxiv>=1.4.3
|
52
|
-
Requires-Dist: pypdf
|
53
|
-
Requires-Dist: sentence-transformers
|
54
|
-
Requires-Dist: faiss-cpu
|
55
|
-
Requires-Dist: pydantic>=2.0.0
|
56
|
-
Requires-Dist: pydantic-settings>=2.0.0
|
57
|
-
Requires-Dist: toml>=0.10.2
|
58
|
-
Requires-Dist: platformdirs>=3.0.0
|
59
|
-
Requires-Dist: dynaconf
|
60
|
-
Requires-Dist: requests>=2.28.0
|
61
|
-
Requires-Dist: tiktoken>=0.4.0
|
62
|
-
Requires-Dist: xmltodict>=0.13.0
|
63
|
-
Requires-Dist: lxml>=4.9.2
|
64
|
-
Requires-Dist: pdfplumber>=0.9.0
|
65
|
-
Requires-Dist: unstructured>=0.10.0
|
66
|
-
Requires-Dist: google-search-results
|
67
|
-
Requires-Dist: importlib-resources>=6.5.2
|
68
|
-
Requires-Dist: setuptools>=78.1.0
|
69
|
-
Requires-Dist: flask-wtf>=1.2.2
|
70
|
-
Description-Content-Type: text/markdown
|
71
|
-
|
72
|
-
# Local Deep Research
|
73
|
-
|
74
|
-
## Features
|
75
|
-
|
76
|
-
- 🔍 **Advanced Research Capabilities**
|
77
|
-
- Automated deep research with intelligent follow-up questions
|
78
|
-
- Proper inline citation and source verification
|
79
|
-
- Multi-iteration analysis for comprehensive coverage
|
80
|
-
- Full webpage content analysis (not just snippets)
|
81
|
-
|
82
|
-
- 🤖 **Flexible LLM Support**
|
83
|
-
- Local AI processing with Ollama models
|
84
|
-
- Cloud LLM support (Claude, GPT)
|
85
|
-
- Supports all Langchain models
|
86
|
-
- Configurable model selection based on needs
|
87
|
-
|
88
|
-
- 📊 **Rich Output Options**
|
89
|
-
- Detailed research findings with proper citations
|
90
|
-
- Well-structured comprehensive research reports
|
91
|
-
- Quick summaries for rapid insights
|
92
|
-
- Source tracking and verification
|
93
|
-
|
94
|
-
- 🔒 **Privacy-Focused**
|
95
|
-
- Runs entirely on your machine when using local models
|
96
|
-
- Configurable search settings
|
97
|
-
- Transparent data handling
|
98
|
-
|
99
|
-
- 🌐 **Enhanced Search Integration**
|
100
|
-
- **Auto-selection of search sources**: The "auto" search engine intelligently analyzes your query and selects the most appropriate search engine
|
101
|
-
- Multiple search engines including Wikipedia, arXiv, PubMed, Semantic Scholar, and more
|
102
|
-
- **Local RAG search for private documents** - search your own documents with vector embeddings
|
103
|
-
- Full webpage content retrieval and intelligent filtering
|
104
|
-
|
105
|
-
- 🎓 **Academic & Scientific Integration**
|
106
|
-
- Direct integration with PubMed, arXiv, Wikipedia, Semantic Scholar
|
107
|
-
- Properly formatted citations from academic sources
|
108
|
-
- Report structure suitable for literature reviews
|
109
|
-
- Cross-disciplinary synthesis of information
|
110
|
-
|
111
|
-
| [Reddit](https://www.reddit.com/r/LocalDeepResearch/) | [Discord](https://discord.gg/ttcqQeFcJ3) |
|
112
|
-
|
113
|
-
A powerful AI-powered research assistant that performs deep, iterative analysis using multiple LLMs and web searches. The system can be run locally for privacy or configured to use cloud-based LLMs for enhanced capabilities.
|
114
|
-
|
115
|
-
<div align="center">
|
116
|
-
<a href="https://www.youtube.com/watch?v=0ISreg9q0p0">
|
117
|
-
<img src="https://img.youtube.com/vi/0ISreg9q0p0/0.jpg" alt="Local Deep Research">
|
118
|
-
<br>
|
119
|
-
<span>▶️ Watch Video</span>
|
120
|
-
</a>
|
121
|
-
</div>
|
122
|
-
|
123
|
-
**Important for non-academic searches:** For normal web searches you will need SearXNG or an API key to a search provider like brave search or SerpAPI. The free searches are mostly academic search engines and will not help you for most normal searches.
|
124
|
-
|
125
|
-
## Quick SearXNG Setup (Recommended)
|
126
|
-
|
127
|
-
```bash
|
128
|
-
# Pull the SearXNG Docker image
|
129
|
-
docker pull searxng/searxng
|
130
|
-
|
131
|
-
# Run SearXNG (will be available at http://localhost:8080)
|
132
|
-
docker run -d -p 8080:8080 --name searxng searxng/searxng
|
133
|
-
|
134
|
-
# Start SearXNG (Required after system restart)
|
135
|
-
docker start searxng
|
136
|
-
```
|
137
|
-
|
138
|
-
Once these commands are executed, SearXNG will be automatically activated and ready to use. The tool will automatically detect and use your local SearXNG instance for searches.
|
139
|
-
|
140
|
-
## Windows Installation
|
141
|
-
|
142
|
-
Download the [Windows Installer](https://github.com/LearningCircuit/local-deep-research/releases/download/v0.1.0/LocalDeepResearch_Setup.exe) for easy one-click installation.
|
143
|
-
|
144
|
-
**Requires Ollama (or other model provider configured in .env).**
|
145
|
-
Download from https://ollama.ai and then pull a model
|
146
|
-
ollama pull gemma3:12b
|
147
|
-
|
148
|
-
## Quick Start (not required if installed with windows installer)
|
149
|
-
|
150
|
-
```bash
|
151
|
-
# Install the package
|
152
|
-
pip install local-deep-research
|
153
|
-
|
154
|
-
# Install required browser automation tools
|
155
|
-
playwright install
|
156
|
-
|
157
|
-
# For local models, install Ollama
|
158
|
-
# Download from https://ollama.ai and then pull a model
|
159
|
-
ollama pull gemma3:12b
|
160
|
-
```
|
161
|
-
|
162
|
-
Then run:
|
163
|
-
|
164
|
-
```bash
|
165
|
-
# Start the web interface (recommended)
|
166
|
-
ldr-web # (OR python -m local_deep_research.web.app)
|
167
|
-
|
168
|
-
# OR run the command line version
|
169
|
-
ldr # (OR python -m local_deep_research.main)
|
170
|
-
```
|
171
|
-
|
172
|
-
Access the web interface at `http://127.0.0.1:5000` in your browser.
|
173
|
-
|
174
|
-
## Docker Support
|
175
|
-
|
176
|
-
Build the image first if you haven't already
|
177
|
-
```bash
|
178
|
-
docker build -t local-deep-research .
|
179
|
-
```
|
180
|
-
|
181
|
-
Quick Docker Run
|
182
|
-
|
183
|
-
```bash
|
184
|
-
# Run with default settings (connects to Ollama running on the host)
|
185
|
-
docker run --network=host \
|
186
|
-
-e LDR_LLM__PROVIDER="ollama" \
|
187
|
-
-e LDR_LLM__MODEL="mistral" \
|
188
|
-
local-deep-research
|
189
|
-
```
|
190
|
-
|
191
|
-
For comprehensive Docker setup information, see:
|
192
|
-
- [Docker Usage Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-usage-readme.md)
|
193
|
-
- [Docker Compose Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-compose-guide.md)
|
194
|
-
|
195
|
-
## Migrating from Version 0.1.0
|
196
|
-
|
197
|
-
If you just upgraded from 0.1.0, and you want to preserve your configuration,
|
198
|
-
you will need to manually migrate from the old config files to the new settings
|
199
|
-
database:
|
200
|
-
|
201
|
-
```bash
|
202
|
-
python -m local_deep_research.migrate_db
|
203
|
-
```
|
204
|
-
|
205
|
-
## Programmatic Access
|
206
|
-
|
207
|
-
Local Deep Research now provides a simple API for programmatic access to its research capabilities:
|
208
|
-
|
209
|
-
```python
|
210
|
-
import os
|
211
|
-
# Set environment variables to control the LLM
|
212
|
-
os.environ["LDR_LLM__MODEL"] = "mistral" # Specify model name
|
213
|
-
|
214
|
-
from local_deep_research import quick_summary, generate_report
|
215
|
-
|
216
|
-
# Generate a quick research summary with custom parameters
|
217
|
-
results = quick_summary(
|
218
|
-
query="advances in fusion energy",
|
219
|
-
search_tool="auto", # Auto-select the best search engine
|
220
|
-
iterations=1, # Single research cycle for speed
|
221
|
-
questions_per_iteration=2, # Generate 2 follow-up questions
|
222
|
-
max_results=30, # Consider up to 30 search results
|
223
|
-
temperature=0.7 # Control creativity of generation
|
224
|
-
)
|
225
|
-
print(results["summary"])
|
226
|
-
```
|
227
|
-
|
228
|
-
These functions provide flexible options for customizing the search parameters, iterations, and output formats. For more examples, see the [programmatic access tutorial](https://github.com/LearningCircuit/local-deep-research/blob/main/examples/programmatic_access.ipynb).
|
229
|
-
|
230
|
-
## Configuration System
|
231
|
-
|
232
|
-
The package automatically creates and manages configuration files in your user directory:
|
233
|
-
|
234
|
-
- **Windows**: `Documents\LearningCircuit\local-deep-research\config\`
|
235
|
-
- **Linux/Mac**: `~/.config/local_deep_research/config/`
|
236
|
-
|
237
|
-
### Default Configuration Files
|
238
|
-
|
239
|
-
When you first run the tool, it creates these configuration files:
|
240
|
-
|
241
|
-
| File | Purpose |
|
242
|
-
|------|---------|
|
243
|
-
| `settings.toml` | General settings for research, web interface, and search |
|
244
|
-
| `search_engines.toml` | Define and configure search engines |
|
245
|
-
| `local_collections.toml` | Configure local document collections for RAG |
|
246
|
-
| `.env` | Environment variables for configuration (recommended for API keys) |
|
247
|
-
|
248
|
-
> **Note:** For comprehensive environment variable configuration, see our [Environment Variables Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/env_configuration.md).
|
249
|
-
|
250
|
-
## Setting Up AI Models
|
251
|
-
|
252
|
-
The system supports multiple LLM providers:
|
253
|
-
|
254
|
-
### Local Models (via Ollama)
|
255
|
-
|
256
|
-
1. [Install Ollama](https://ollama.ai)
|
257
|
-
2. Pull a model: `ollama pull gemma3:12b` (recommended model)
|
258
|
-
3. Ollama runs on port 11434 by default
|
259
|
-
|
260
|
-
### Cloud Models
|
261
|
-
|
262
|
-
Add API keys to your environment variables (recommended) by creating a `.env` file in your config directory:
|
263
|
-
|
264
|
-
```bash
|
265
|
-
# Set API keys for cloud providers in .env
|
266
|
-
ANTHROPIC_API_KEY=your-api-key-here # For Claude models
|
267
|
-
OPENAI_API_KEY=your-openai-key-here # For GPT models
|
268
|
-
OPENAI_ENDPOINT_API_KEY=your-key-here # For OpenRouter or similar services
|
269
|
-
|
270
|
-
# Set your preferred LLM provider and model
|
271
|
-
LDR_LLM__PROVIDER=ollama # Options: ollama, openai, anthropic, etc.
|
272
|
-
LDR_LLM__MODEL=gemma3:12b # Model name to use
|
273
|
-
```
|
274
|
-
|
275
|
-
### Supported LLM Providers
|
276
|
-
|
277
|
-
The system supports multiple LLM providers:
|
278
|
-
|
279
|
-
| Provider | Type | API Key | Setup Details | Models |
|
280
|
-
|----------|------|---------|---------------|--------|
|
281
|
-
| `OLLAMA` | Local | No | Install from [ollama.ai](https://ollama.ai) | Mistral, Llama, Gemma, etc. |
|
282
|
-
| `OPENAI` | Cloud | `OPENAI_API_KEY` | Set in environment | GPT-3.5, GPT-4, GPT-4o |
|
283
|
-
| `ANTHROPIC` | Cloud | `ANTHROPIC_API_KEY` | Set in environment | Claude 3 Opus, Sonnet, Haiku |
|
284
|
-
| `OPENAI_ENDPOINT` | Cloud | `OPENAI_ENDPOINT_API_KEY` | Set in environment | Any OpenAI-compatible model |
|
285
|
-
| `VLLM` | Local | No | Requires GPU setup | Any supported by vLLM |
|
286
|
-
| `LMSTUDIO` | Local | No | Use LM Studio server | Models from LM Studio |
|
287
|
-
| `LLAMACPP` | Local | No | Configure model path | GGUF model formats |
|
288
|
-
|
289
|
-
The `OPENAI_ENDPOINT` provider can access any service with an OpenAI-compatible API, including:
|
290
|
-
- OpenRouter (access to hundreds of models)
|
291
|
-
- Azure OpenAI
|
292
|
-
- Together.ai
|
293
|
-
- Groq
|
294
|
-
- Anyscale
|
295
|
-
- Self-hosted LLM servers with OpenAI compatibility
|
296
|
-
|
297
|
-
## Setting Up Search Engines
|
298
|
-
|
299
|
-
Some search engines require API keys. Add them to your environment variables by creating a `.env` file in your config directory:
|
300
|
-
|
301
|
-
```bash
|
302
|
-
# Search engine API keys (add to .env file)
|
303
|
-
SERP_API_KEY=your-serpapi-key-here # For Google results via SerpAPI
|
304
|
-
GOOGLE_PSE_API_KEY=your-google-key-here # For Google Programmable Search
|
305
|
-
GOOGLE_PSE_ENGINE_ID=your-pse-id-here # For Google Programmable Search
|
306
|
-
BRAVE_API_KEY=your-brave-search-key-here # For Brave Search
|
307
|
-
GUARDIAN_API_KEY=your-guardian-key-here # For The Guardian
|
308
|
-
|
309
|
-
# Set your preferred search tool
|
310
|
-
LDR_SEARCH__TOOL=auto # Default: intelligently selects best engine
|
311
|
-
```
|
312
|
-
|
313
|
-
> **Tip:** To override other settings via environment variables (e.g., to change the web port), use: **LDR_WEB__PORT=8080**
|
314
|
-
|
315
|
-
### Available Search Engines
|
316
|
-
|
317
|
-
| Engine | Purpose | API Key Required? | Rate Limit |
|
318
|
-
|--------|---------|-------------------|------------|
|
319
|
-
| `auto` | Intelligently selects the best engine | No | Based on selected engine |
|
320
|
-
| `wikipedia` | General knowledge and facts | No | No strict limit |
|
321
|
-
| `arxiv` | Scientific papers and research | No | No strict limit |
|
322
|
-
| `pubmed` | Medical and biomedical research | No | No strict limit |
|
323
|
-
| `semantic_scholar` | Academic literature across all fields | No | 100/5min |
|
324
|
-
| `github` | Code repositories and documentation | No | 60/hour (unauthenticated) |
|
325
|
-
| `brave` | Web search (privacy-focused) | Yes | Based on plan |
|
326
|
-
| `serpapi` | Google search results | Yes | Based on plan |
|
327
|
-
| `google_pse` | Custom Google search | Yes | 100/day free tier |
|
328
|
-
| `wayback` | Historical web content | No | No strict limit |
|
329
|
-
| `searxng` | Local web search engine | No (requires local server) | No limit |
|
330
|
-
| Any collection name | Search your local documents | No | No limit |
|
331
|
-
|
332
|
-
> **Note:** For detailed SearXNG setup, see our [SearXNG Setup Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/SearXNG-Setup.md).
|
333
|
-
|
334
|
-
## Local Document Search (RAG)
|
335
|
-
|
336
|
-
The system can search through your local documents using vector embeddings.
|
337
|
-
|
338
|
-
### Setting Up Document Collections
|
339
|
-
|
340
|
-
1. Define collections in `local_collections.toml`. Default collections include:
|
341
|
-
|
342
|
-
```toml
|
343
|
-
[project_docs]
|
344
|
-
name = "Project Documents"
|
345
|
-
description = "Project documentation and specifications"
|
346
|
-
paths = ["@format ${DOCS_DIR}/project_documents"]
|
347
|
-
enabled = true
|
348
|
-
embedding_model = "all-MiniLM-L6-v2"
|
349
|
-
embedding_device = "cpu"
|
350
|
-
embedding_model_type = "sentence_transformers"
|
351
|
-
max_results = 20
|
352
|
-
max_filtered_results = 5
|
353
|
-
chunk_size = 1000
|
354
|
-
chunk_overlap = 200
|
355
|
-
cache_dir = "__CACHE_DIR__/local_search/project_docs"
|
356
|
-
```
|
357
|
-
|
358
|
-
2. Create your document directories:
|
359
|
-
- The `${DOCS_DIR}` variable points to a default location in your Documents folder
|
360
|
-
- Documents are automatically indexed when the search is first used
|
361
|
-
|
362
|
-
### Using Local Search
|
363
|
-
|
364
|
-
You can use local document search in several ways:
|
365
|
-
|
366
|
-
1. **Auto-selection**: Set `tool = "auto"` in `settings.toml` [search] section
|
367
|
-
2. **Explicit collection**: Set `tool = "project_docs"` to search only that collection
|
368
|
-
3. **All collections**: Set `tool = "local_all"` to search across all collections
|
369
|
-
4. **Query syntax**: Type `collection:project_docs your query` to target a specific collection
|
370
|
-
|
371
|
-
|
372
|
-
## Advanced Configuration
|
373
|
-
|
374
|
-
### Research Parameters
|
375
|
-
|
376
|
-
Edit `settings.toml` to customize research parameters or use environment variables:
|
377
|
-
|
378
|
-
```toml
|
379
|
-
[search]
|
380
|
-
# Search tool to use (auto, wikipedia, arxiv, etc.)
|
381
|
-
tool = "auto"
|
382
|
-
|
383
|
-
# Number of research cycles
|
384
|
-
iterations = 2
|
385
|
-
|
386
|
-
# Questions generated per cycle
|
387
|
-
questions_per_iteration = 2
|
388
|
-
|
389
|
-
# Results per search query
|
390
|
-
max_results = 50
|
391
|
-
|
392
|
-
# Results after relevance filtering
|
393
|
-
max_filtered_results = 5
|
394
|
-
```
|
395
|
-
|
396
|
-
Using environment variables:
|
397
|
-
```bash
|
398
|
-
LDR_SEARCH__TOOL=auto
|
399
|
-
LDR_SEARCH__ITERATIONS=3
|
400
|
-
LDR_SEARCH__QUESTIONS_PER_ITERATION=2
|
401
|
-
```
|
402
|
-
|
403
|
-
## Web Interface
|
404
|
-
|
405
|
-
The web interface offers several features:
|
406
|
-
|
407
|
-
- **Dashboard**: Start and manage research queries
|
408
|
-
- **Real-time Updates**: Track research progress with improved logging
|
409
|
-
- **Research History**: Access past queries
|
410
|
-
- **PDF Export**: Download reports
|
411
|
-
- **Research Management**: Terminate processes or delete records
|
412
|
-
- **Enhanced Settings Panel**: New unified settings UI with improved organization
|
413
|
-
|
414
|
-
## Command Line Interface
|
415
|
-
|
416
|
-
The CLI version allows you to:
|
417
|
-
|
418
|
-
1. Choose between a quick summary or detailed report
|
419
|
-
2. Enter your research query
|
420
|
-
3. View results directly in the terminal
|
421
|
-
4. Save reports automatically to the configured output directory
|
422
|
-
|
423
|
-
## Development Environment
|
424
|
-
|
425
|
-
This project now uses PDM for dependency management. To set up a development environment:
|
426
|
-
|
427
|
-
```bash
|
428
|
-
# Install PDM if you don't have it
|
429
|
-
pip install pdm
|
430
|
-
|
431
|
-
# Install dependencies
|
432
|
-
pdm install --no-self
|
433
|
-
|
434
|
-
# Activate the environment
|
435
|
-
pdm venv activate
|
436
|
-
```
|
437
|
-
|
438
|
-
You can run the application directly using Python module syntax:
|
439
|
-
|
440
|
-
```bash
|
441
|
-
# Run the web interface
|
442
|
-
python -m local_deep_research.web.app
|
443
|
-
|
444
|
-
# Run the CLI version
|
445
|
-
python -m local_deep_research.main
|
446
|
-
```
|
447
|
-
|
448
|
-
For more information, see the [development documentation](docs/developing.md).
|
449
|
-
|
450
|
-
## Unified Database
|
451
|
-
|
452
|
-
The application now uses a single unified database (`ldr.db`) for all settings and history, making configuration management simpler and more reliable.
|
453
|
-
|
454
|
-
### Migration from v0.1.x
|
455
|
-
|
456
|
-
If you have existing data in legacy databases from v0.1.x, the application will automatically migrate your data when you first run v0.2.0.
|
457
|
-
|
458
|
-
## Contributing
|
459
|
-
|
460
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
461
|
-
|
462
|
-
### Development Setup with PDM
|
463
|
-
|
464
|
-
This project uses PDM for dependency management. Here's how to set up your development environment:
|
465
|
-
|
466
|
-
```bash
|
467
|
-
# Install PDM if you don't have it
|
468
|
-
pip install pdm
|
469
|
-
|
470
|
-
# Clone the repository
|
471
|
-
git clone https://github.com/LearningCircuit/local-deep-research.git
|
472
|
-
cd local-deep-research
|
473
|
-
|
474
|
-
# Install dependencies including dev dependencies
|
475
|
-
pdm install --no-self
|
476
|
-
|
477
|
-
# Set up pre-commit hooks
|
478
|
-
pdm run pre-commit install
|
479
|
-
pdm run pre-commit install-hooks
|
480
|
-
|
481
|
-
# Activate the virtual environment
|
482
|
-
pdm venv activate
|
483
|
-
```
|
484
|
-
|
485
|
-
#### Common PDM Commands
|
486
|
-
|
487
|
-
```bash
|
488
|
-
# Run linting checks
|
489
|
-
pdm run flake8
|
490
|
-
pdm run black .
|
491
|
-
|
492
|
-
# Run tests (when available)
|
493
|
-
pdm run pytest
|
494
|
-
|
495
|
-
# Add a new dependency
|
496
|
-
pdm add package-name
|
497
|
-
|
498
|
-
# Add a development dependency
|
499
|
-
pdm add -dG dev package-name
|
500
|
-
```
|
501
|
-
|
502
|
-
### Contributing Process
|
503
|
-
|
504
|
-
1. Fork the repository
|
505
|
-
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
506
|
-
3. Make your changes
|
507
|
-
4. Run linting checks to ensure code quality
|
508
|
-
5. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
509
|
-
6. Push to the branch (`git push origin feature/AmazingFeature`)
|
510
|
-
7. **Important:** Open a Pull Request against the `dev` branch, not the `main` branch
|
511
|
-
|
512
|
-
We prefer all pull requests to be submitted against the `dev` branch for easier testing and integration before releasing to the main branch.
|
513
|
-
|
514
|
-
### Getting Help
|
515
|
-
|
516
|
-
Join our [Discord server](https://discord.gg/ttcqQeFcJ3) if you're planning to contribute. Let us know about your plans - we're always happy to guide new contributors and discuss feature ideas!
|
517
|
-
|
518
|
-
## Community & Support
|
519
|
-
|
520
|
-
Join our [Discord server](https://discord.gg/ttcqQeFcJ3) to exchange ideas, discuss usage patterns, and
|
521
|
-
share research approaches.
|
522
|
-
|
523
|
-
Follow our [Subreddit](https://www.reddit.com/r/LocalDeepResearch/) for announcements, updates, and feature highlights.
|
524
|
-
|
525
|
-
## License
|
526
|
-
|
527
|
-
This project is licensed under the MIT License.
|
528
|
-
|
529
|
-
## Acknowledgments
|
530
|
-
|
531
|
-
- Built with [Ollama](https://ollama.ai) for local AI processing
|
532
|
-
- Search powered by multiple sources:
|
533
|
-
- [Wikipedia](https://www.wikipedia.org/) for factual knowledge
|
534
|
-
- [arXiv](https://arxiv.org/) for scientific papers
|
535
|
-
- [PubMed](https://pubmed.ncbi.nlm.nih.gov/) for biomedical literature
|
536
|
-
- [Semantic Scholar](https://www.semanticscholar.org/) for academic literature
|
537
|
-
- [DuckDuckGo](https://duckduckgo.com) for web search
|
538
|
-
- [The Guardian](https://www.theguardian.com/) for journalism
|
539
|
-
- [SerpAPI](https://serpapi.com) for Google search results
|
540
|
-
- [SearXNG](https://searxng.org/) for local web-search engine
|
541
|
-
- [Brave Search](https://search.brave.com/) for privacy-focused web search
|
542
|
-
- Built on [LangChain](https://github.com/hwchase17/langchain) framework
|
543
|
-
- Uses [justext](https://github.com/miso-belica/justext), [Playwright](https://playwright.dev), [FAISS](https://github.com/facebookresearch/faiss), and more
|
544
|
-
|
545
|
-
> **Support Free Knowledge:** If you frequently use the search engines in this tool, please consider making a donation to these organizations:
|
546
|
-
> - [Donate to Wikipedia](https://donate.wikimedia.org)
|
547
|
-
> - [Support arXiv](https://arxiv.org/about/give)
|
548
|
-
> - [Donate to DuckDuckGo](https://duckduckgo.com/donations)
|
549
|
-
> - [Support PubMed/NCBI](https://www.nlm.nih.gov/pubs/donations/donations.html)
|
File without changes
|
{local_deep_research-0.3.1.dist-info → local_deep_research-0.3.3.dist-info}/entry_points.txt
RENAMED
File without changes
|
{local_deep_research-0.3.1.dist-info → local_deep_research-0.3.3.dist-info}/licenses/LICENSE
RENAMED
File without changes
|