- Extract shared helpers into steps/common.sh (colors, print_*, wait_for_user, ask_confirmation) - Split each install step into its own sourced script under steps/ - setup.sh now sources step files instead of duplicating logic - Add setup_ollama.sh: Ollama-only device setup (no Docker) - Add setup_onyx.sh: Onyx-only device setup with auto-detection of Ollama host via network scan - setup_ollama.sh prints ready-to-run setup_onyx.sh command with detected IP at completion - Docker memory recommendation is MAX when machine has <20 GB RAM, 20 GB otherwise - cleanup.sh and check-status.sh source steps/common.sh with inline curl fallback - check-status.sh detects device mode (single/ollama/onyx) and skips irrelevant checks - cleanup.sh reinstall message lists all three setup one-liners - README updated with split-device one-liner commands
57 lines
2 KiB
Bash
Executable file
57 lines
2 KiB
Bash
Executable file
#!/bin/bash
|
|
# Step: RAG content upload. Source common.sh before sourcing this file.
|
|
# Requires: repo cloned at ~/riotsecure.
|
|
|
|
rag_upload() {
|
|
print_step "RAG Content Upload"
|
|
|
|
echo "Choose content upload method:"
|
|
echo " A - Upload as File (recommended)"
|
|
echo " B - Upload as URL"
|
|
echo " S - Skip this step"
|
|
echo ""
|
|
read -p "Enter your choice (A/B/S): " choice
|
|
|
|
case $choice in
|
|
[Aa])
|
|
print_warning "Fetching content from riot-sources.txt..."
|
|
cd ~/riotsecure
|
|
if [ -f "./fetchContent.sh" ]; then
|
|
chmod +x ./fetchContent.sh
|
|
if [ -f "./riot-sources.txt" ]; then
|
|
./fetchContent.sh riot-sources.txt
|
|
print_success "Content fetched successfully"
|
|
|
|
echo ""
|
|
echo "MANUAL STEP REQUIRED:"
|
|
echo "1. In the web interface, go to Admin Panel → Add Connector → File"
|
|
echo "2. Give the connector a name"
|
|
echo "3. Upload the files from ~/riotsecure/content"
|
|
echo "4. Wait ~30 seconds for indexing to complete"
|
|
echo ""
|
|
else
|
|
print_error "riot-sources.txt not found!"
|
|
fi
|
|
else
|
|
print_error "fetchContent.sh not found!"
|
|
fi
|
|
wait_for_user
|
|
;;
|
|
[Bb])
|
|
echo ""
|
|
echo "MANUAL STEP REQUIRED:"
|
|
echo "1. In the web interface, go to Admin Panel → Add Connector → Web"
|
|
echo "2. Add each URL from riot-sources.txt as a separate connector"
|
|
echo "3. Use scrape method 'Single'"
|
|
echo "4. Wait ~30 seconds for indexing to complete"
|
|
echo ""
|
|
wait_for_user
|
|
;;
|
|
[Ss])
|
|
print_warning "Skipping RAG content upload"
|
|
;;
|
|
*)
|
|
print_warning "Invalid choice. Skipping RAG content upload"
|
|
;;
|
|
esac
|
|
}
|