Skip to content

Commit 71b58bf

Browse files
committed
Update README.md
1 parent 9aceb64 commit 71b58bf

1 file changed

Lines changed: 31 additions & 17 deletions

File tree

README.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ A modern, self-hosted portfolio website with an AI assistant powered by local LL
4040
- **Language**: Python 3.11+
4141
- **Vector DB**: ChromaDB
4242
- **LLM**: Ollama (local models)
43-
- **Embeddings**: sentence-transformers
43+
- **Embeddings**: Ollama (nomic-embed-text)
4444

4545
---
4646

@@ -79,6 +79,9 @@ Edit `backend/.env`:
7979
OLLAMA_BASE_URL=http://ollama:11434
8080
OLLAMA_MODEL=llama3.2:3b
8181
82+
# Embedding Model (Ollama)
83+
EMBEDDING_MODEL=nomic-embed-text
84+
8285
# ChromaDB Configuration
8386
CHROMA_PERSIST_DIR=./data/chroma_db
8487
CHROMA_COLLECTION_NAME=portfolio_docs
@@ -124,14 +127,9 @@ docker compose up -d
124127
docker compose ps
125128
```
126129

127-
### Step 5: Initialize Ollama Model
128-
129-
```bash
130-
# Download the LLM model (this may take 5-15 minutes, ~2GB)
131-
docker compose exec ollama ollama pull llama3.2:3b
132-
```
130+
### Step 5: Access the Application
133131

134-
### Step 6: Access the Application
132+
> **Note**: The `ollama-init` service automatically pulls required models (llama3.2:3b for LLM, nomic-embed-text for embeddings) on first startup. This may take 5-15 minutes depending on your connection.
135133
136134
- **Portfolio**: http://localhost:3000
137135
- **Admin Dashboard**: http://localhost:3000/admin
@@ -191,8 +189,9 @@ npm run dev
191189
# Then start the service
192190
ollama serve
193191

194-
# Download the model
195-
ollama pull llama3.2:3b
192+
# Download the required models
193+
ollama pull llama3.2:3b # LLM model
194+
ollama pull nomic-embed-text # Embedding model
196195
```
197196

198197
---
@@ -263,14 +262,26 @@ The portfolio uses an amber/gold color scheme. To customize:
263262
3. **Components**: Modify Tailwind classes in component files
264263
4. **Theme**: Adjust colors in `frontend/components/layout/ClientLayout.tsx`
265264

266-
### Change AI Model
267-
268-
To use a different Ollama model:
265+
### Change AI Models
269266

270-
1. Update `OLLAMA_MODEL` in `backend/.env`
267+
**To change the LLM model:**
268+
1. Update `OLLAMA_MODEL` in `backend/.env` (or docker-compose.yml)
271269
2. Pull the new model: `docker compose exec ollama ollama pull <model-name>`
272270
3. Restart the backend: `docker compose restart backend`
273271

272+
**To change the embedding model:**
273+
1. Update `EMBEDDING_MODEL` in `backend/.env` (or docker-compose.yml)
274+
2. Pull the new model: `docker compose exec ollama ollama pull <model-name>`
275+
3. Reset ChromaDB (embeddings have different dimensions):
276+
```bash
277+
docker compose down
278+
docker volume rm portfolio_chroma_data
279+
docker compose up -d
280+
```
281+
4. Re-ingest your documents
282+
283+
> **Note**: The backend auto-detects embedding dimension mismatches and resets the collection automatically on startup.
284+
274285
---
275286

276287
## 🔧 Docker Commands
@@ -519,11 +530,13 @@ docker compose up -d --build
519530
### Ollama model not loading
520531

521532
```bash
522-
# Check Ollama logs
533+
# Check Ollama and ollama-init logs
523534
docker compose logs ollama
535+
docker compose logs ollama-init
524536

525-
# Manually pull the model
537+
# Manually pull the models
526538
docker compose exec ollama ollama pull llama3.2:3b
539+
docker compose exec ollama ollama pull nomic-embed-text
527540

528541
# List available models
529542
docker compose exec ollama ollama list
@@ -556,6 +569,8 @@ docker volume rm portfolio_chroma_data
556569
docker compose up -d
557570
```
558571

572+
> **Note**: If you change embedding models, the backend will auto-detect dimension mismatches and reset the collection on startup. You'll see a log message prompting you to re-ingest documents.
573+
559574
---
560575

561576
## 📚 Additional Resources
@@ -597,4 +612,3 @@ MIT License - feel free to use this for your own portfolio!
597612
**Built with ❤️ using modern web technologies and AI**
598613

599614
</div>
600-
# Test SSH fix

0 commit comments

Comments
 (0)