feat(maker): AI parsing schede tecniche PDF via OpenRouter

- Nuovo servizio ai_service.py: estrae testo da PDF (pdfplumber) + analisi AI (OpenRouter)
- Endpoint POST /api/recipes/{id}/parse-technical-sheet con validazione file
- UI: bottone "Importa da PDF" nel task editor con modale upload + preview editabile
- Task suggeriti modificabili/rimovibili prima della creazione bulk
- Config: OPENROUTER_API_KEY e OPENROUTER_MODEL in .env
- Dipendenze: pdfplumber + httpx aggiunti a server deps

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-05-24 11:01:00 +00:00
parent 9bd605c958
commit d2bf0b5828
10 changed files with 539 additions and 10 deletions
+4
View File
@@ -35,6 +35,10 @@ MAX_UPLOAD_SIZE_MB=50
# --- Setup Page ---
SETUP_PASSWORD= # Password per /api/setup, vuoto = disabilitato
# --- AI (OpenRouter) ---
OPENROUTER_API_KEY= # API key per parsing schede tecniche, vuoto = disabilitato
OPENROUTER_MODEL=anthropic/claude-sonnet-4 # Modello AI da utilizzare
# --- Docker ---
DB_ROOT_PASSWORD=root_password_change_me
NGINX_PORT=80