This commit is contained in:
ilia
2025-07-17 16:55:21 -08:00
parent b3702fa151
commit ead5cdef15
3 changed files with 453 additions and 7 deletions
+37 -6
View File
@@ -98,7 +98,7 @@ AI_BATCH_SIZE=3
#### Local AI Analysis (Ollama)
- `ENABLE_LOCAL_AI=true`: Enable local AI analysis
- `OLLAMA_MODEL`: Model to use (`mistral`, `llama2`, `codellama`)
- `OLLAMA_MODEL`: Model to use (auto-detects available models: `mistral`, `llama2`, `codellama`, etc.)
- `OLLAMA_HOST`: Ollama server URL (default: `http://localhost:11434`)
- `RUN_LOCAL_AI_AFTER_SCRAPING`: Run AI immediately after scraping (`true`/`false`)
- `AI_CONTEXT`: Context for analysis (e.g., `job layoffs`)
@@ -107,6 +107,26 @@ AI_BATCH_SIZE=3
## Usage
### Demo Mode
For testing and demonstration purposes, you can run the interactive demo:
```bash
# Run interactive demo (simulates scraping with fake data)
npm run demo
# Or directly:
node demo.js
```
The demo mode:
- Uses fake, anonymized data for safety
- Walks through all configuration options interactively
- Shows available Ollama models for selection
- Demonstrates the complete workflow without actual LinkedIn scraping
- Perfect for creating documentation, GIFs, or testing configurations
### Basic Commands
```bash
@@ -170,34 +190,44 @@ node ai-analyzer-local.js --context="job layoffs"
# Analyze specific file
node ai-analyzer-local.js --input=results/results-2024-01-15.json --context="hiring"
# Use different model
# Use different model (auto-detects available models)
node ai-analyzer-local.js --model=llama2 --context="remote work"
# Change confidence and batch size
node ai-analyzer-local.js --context="job layoffs" --confidence=0.8 --batch-size=5
# Check available models
ollama list
```
## Workflow Examples
### 1. Quick Start (All Features)
### 1. First Time Setup (Demo Mode)
```bash
# Run interactive demo to test configuration
npm run demo
```
### 2. Quick Start (All Features)
```bash
node linkedout.js --ai-after
```
### 2. Fast Scraping Only
### 3. Fast Scraping Only
```bash
node linkedout.js --no-location --no-ai
```
### 3. Location-Only Filtering
### 4. Location-Only Filtering
```bash
node linkedout.js --no-ai
```
### 4. Test Different AI Contexts
### 5. Test Different AI Contexts
```bash
node linkedout.js --no-ai
@@ -213,6 +243,7 @@ linkedout/
├── .env # Your configuration (create from template)
├── env-config.example # Configuration template
├── linkedout.js # Main scraper
├── demo.js # Interactive demo with fake data
├── ai-analyzer-local.js # Free local AI analyzer (Ollama)
├── location-utils.js # Enhanced location utilities
├── package.json # Dependencies