Skip to content

Commit b4f12ba

Browse files
Merge pull request #39 from thefirehacker/3.3.0_Vector_Ollama_Integration
3.3.0 vector ollama integration
2 parents af90347 + 10da485 commit b4f12ba

File tree

4 files changed

+551
-58
lines changed

4 files changed

+551
-58
lines changed

DeepResearch.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ <h3>🔧 Research Controls</h3>
949949

950950
<button id="generateResearch" class="btn primary" disabled>🚀 Generate Research</button>
951951
<button id="exportResearch" class="btn secondary">📥 Export Results</button>
952-
<button id="clearAll" class="btn secondary">🗑️ Clear All</button>
952+
<button id="clearAll" class="btn secondary">🧹 Clear All</button>
953953

954954
<!-- Usage Agreement & Terms Section -->
955955
<div class="control-group" style="margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.2);">
@@ -1006,6 +1006,25 @@ <h3>🔧 Research Controls</h3>
10061006
<button class="structure-btn" onclick="collapseStructure()"></button>
10071007
</div>
10081008
</div>
1009+
1010+
<!-- Document Integration Status -->
1011+
<div class="document-status" id="documentStatus" style="
1012+
background: rgba(255, 255, 255, 0.1);
1013+
border-radius: 8px;
1014+
padding: 12px;
1015+
margin-bottom: 15px;
1016+
border: 1px solid rgba(255, 255, 255, 0.2);
1017+
font-size: 12px;
1018+
color: rgba(255, 255, 255, 0.8);
1019+
text-align: center;
1020+
">
1021+
<div id="docStatusIcon">📂</div>
1022+
<div id="docStatusText">No documents uploaded</div>
1023+
<div id="docStatusDetails" style="font-size: 10px; color: rgba(255, 255, 255, 0.6); margin-top: 4px;">
1024+
Upload documents to enhance research with your content
1025+
</div>
1026+
</div>
1027+
10091028
<div class="structure-list" id="structureList">
10101029
<div class="empty-state">
10111030
<h3>📝 No Topics Yet</h3>
@@ -1027,6 +1046,7 @@ <h3>📝 No Topics Yet</h3>
10271046
<button class="tab-btn" data-tab="sources">📚 Sources</button>
10281047
<button class="tab-btn" data-tab="notes">📝 Notes</button>
10291048
</div>
1049+
<button id="clearResearchOutput" class="btn secondary" style="margin-left: 10px;">🗑️ Clear Output</button>
10301050
<button class="structure-btn" onclick="fullscreenOutput()"></button>
10311051
</div>
10321052
</div>

lib/AIAssistant/AIAssistant-Backend.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,9 +1339,9 @@ When user asks for something, generate creative, compact p5.js code that creates
13391339
if (this.aiSession.provider === 'ollama') {
13401340
const chatPrompt = this.customContexts.qwen.general.buildPrompt(systemPrompt, userMessage);
13411341

1342-
// Add timeout for research generation
1342+
// Add timeout for research generation - increased for complex document-enhanced research
13431343
const controller = new AbortController();
1344-
const timeoutId = setTimeout(() => controller.abort(), 45000); // 45 second timeout for research
1344+
const timeoutId = setTimeout(() => controller.abort(), 120000); // 2 minute timeout for research
13451345

13461346
const response = await fetch(`${this.aiSession.baseURL}/api/generate`, {
13471347
method: 'POST',
@@ -1380,7 +1380,7 @@ When user asks for something, generate creative, compact p5.js code that creates
13801380
} catch (error) {
13811381
console.error('Research generation error:', error);
13821382
if (error.name === 'AbortError') {
1383-
throw new Error('Research generation timeout (>45s). The model may be too slow or overloaded. Try using a smaller model or check system resources.');
1383+
throw new Error('Research generation timeout (>2 minutes). The model may be too slow or overloaded. Try using a smaller/faster model like llama3.2:3b or check system resources.');
13841384
} else {
13851385
throw error;
13861386
}

0 commit comments

Comments
 (0)