CKGrafico / CKGrafico/chat-copilot
[Stretch] Implement Phase 2: Replace template engine with Squad LLM pipeline
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Why:** LLM-based replies are more contextual and personalized than templates.
**What to build:** Replace templateEngine in generateReply capability with a Squad pipeline that calls a local LLM (e.g., Llama 3.2 1B via Transformers.js). Keep Squad interface unchanged so swap is seamless. Add settings toggle to switch between template/LLM modes.
**Acceptance criteria:**
- [ ] Load local LLM model (e.g., meta-llama/Llama-3.2-1B) via Transformers.js
- [ ] Replace templateEngine.generateReplies() with LLM prompt in generateReply capability
- [ ] Prompt includes profile instructions + transcription
- [ ] Generate 3 reply variants (short, medium, long)
- [ ] Settings toggle: "Use AI Replies" (default: templates)
- [ ] Performance acceptable on mobile (< 10s for 3 replies)
- [ ] Test with real transcriptions confirms quality
**Depends on:** #22
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the generateReply capability and its templateEngine.generateReplies() call, then review dependency #22 before choosing the Squad pipeline integration point. Check how settings are represented to place the "Use AI Replies" toggle, and verify the Transformers.js local model path with real transcriptions. Done means template mode remains the default, LLM mode produces short, medium, and long variants, and three replies complete on mobile in under 10 seconds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100