Spaces:
Sleeping
Sleeping
Commit History
-
feat: add in-app Guide page with 8 sections (IT/EN)
Fabio Antonini +1: Claude Sonnet 4.6Implements the Help/Guida page accessible from the user dropdown menu. Includes Quick Start, Features, AI Models, Agent Command Examples, FAQ, Glossary, Requirements and Privacy sections — fully bilingual via i18next. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>401e56e -
feat: move language toggle into Settings dialog
Fabio Antonini +1: Claude Sonnet 4.6Language switch moved from the sidebar dropdown menu into the Settings modal, below the OpenAI key section — keeps the dropdown lean and groups all preferences in one place. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>13c1698 -
feat: ChatGPT-style sidebar footer with Settings dialog
Fabio Antonini +1: Claude Sonnet 4.6- Replace bottom config section with a user avatar + name button that opens a dropdown menu (Impostazioni, Guida, lingua, Esci) - Extract all model/key configuration into a new SettingsDialog modal - Add Dialog shadcn component wrapping @radix-ui/react-dialog - Add nav.settings and nav.help i18n keys (it/en) - Sidebar is now cleaner; config is accessible via Impostazioni Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>de10826 -
feat: per-user OpenAI key + model preferences persisted in DB
Fabio Antonini +1: Claude Sonnet 4.6- UserSettings table stores encrypted OpenAI key (Fernet) and last-selected models (rag, vlm, ocr, embed) per user - ContextVar propagates the user's decrypted key to all core modules without changing function signatures; global OPENAI_API_KEY env var as fallback - set_openai_context FastAPI dependency injected in rag, compliance, agent routers - GET/PUT /users/me/settings and PATCH /users/me/settings/models endpoints - DELETE /users/me/settings/openai-key to revoke personal key - Sidebar restores saved model selections on login and persists changes - Inline DB migration in init_db() adds new columns to existing user_settings table - docker-compose: OPENAI_API_KEY and SETTINGS_ENCRYPTION_KEY passed as env vars - Remove PUT /rag/openai-key (global key is env-only, never written to file) - Sidebar: uppercase removed from section headers; "Configurazione" now title-case Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>413c3b1 -
feat: add OpenAI API support (gpt-5.4 family) alongside Ollama
Fabio Antonini +1: Claude Sonnet 4.6- New core/providers.py: provider abstraction layer with model detection, OpenAI client factory, API key management and model catalogue - core/rag.py: provider-aware _embed()/_embed_batch()/stream_llm() wrappers; set_embed_model() with NPZ cache invalidation on provider switch - core/compliance.py, ocr.py, document_layout.py, agent.py: OpenAI branches for all LLM/VLM call sites; max_tokens → max_completion_tokens for gpt-5.4 - core/pipeline.py: Step 7 title shows active provider and model name - backend: new /rag/openai-key and /rag/embed-model endpoints; /rag/status returns OpenAI model lists when key is configured - frontend: Sidebar dropdowns use <optgroup> Ollama/OpenAI; OpenAI key UI; embedding model selector; i18n keys for en/it Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f1196cf
-
fix: sidebar UX — move Projects under Agent, remove duplicate + in New chat
Fabio Antonini +1: Claude Sonnet 4.6- Rename nav.agent_projects to "Projects" / "Progetti" (shorter label) - Move the Projects collapsible section directly below the Agente Documentale link instead of at the bottom of the nav - Remove leading "+ " from agent.new_chat i18n keys — the button already renders a Plus icon, causing a double "+" in the UI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ad2e396
-
feat: agent projects with persistent chats and reusable documents
Fabio Antonini +1: Claude Sonnet 4.6- Add AgentChat and AgentMessage models (cascade delete from Project) - Extend /agent/chat to persist messages and save uploads to MinIO - New endpoints: agent projects, chats, documents CRUD - New AgentProjectPage: 3-column layout (chat list / chat / documents) - Sidebar: Agent Projects section with inline project creation - Documents panel: click to reuse without re-uploading - i18n: new keys for agent project UI (EN + IT) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f9c4034 -
feat: separate LLM and VLM model slots + fix agent OCR model routing
Fabio Antonini +1: Claude Sonnet 4.6- core/rag.py: separate _rag_model (text, default qwen3:4b) from _vlm_model (vision, default qwen3-vl:8b); add get/set_vlm_model + _persist_vlm_model_to_env; load both from .env at startup via _load_model_from_env() - core/agent.py: AGENT_MODEL = qwen3:4b (was qwen3-vl:8b); trascrivi_documento now uses htr_transcribe() respecting OCR model selector instead of hardcoded VLM - core/document_layout.py: _get_active_model() reads _vlm_model instead of _rag_model - core/ocr.py: _vlm_transcribe() reads _vlm_model instead of _rag_model - backend/routers/rag.py: add GET/PUT /rag/vlm-model endpoints - frontend: add VLM model selector in sidebar (Sidebar.tsx, api.ts, i18n) - backend/config.py + .env.example: add vlm_model field, update defaults - README.md: document three model slots (LLM/VLM/OCR) with GPU impact table Result: text-only tasks (transcribe+NER+dating with OCR=easyocr) use only qwen3:4b; qwen3-vl:8b is loaded only for image analysis (table/figure/vlm-ocr). Co-Authored-By: Cl…3c9c028 -
feat: Agente Documentale LangChain + OCR selector + stop + SQLite WAL
Fabio Antonini +1: Claude Sonnet 4.6- core/agent.py: LangChain agent con 10 tool forensi (OCR, NER, firma, grafologia, scrittore, datazione, layout, RAG), streaming SSE, stop via threading.Event, short-path workaround per path truncation LLM - core/document_layout.py: wrapper PaddleOCR lazy-loaded con call_vision_model streaming (timeout=(10,300), stream=True) - backend/routers/agent.py: endpoint POST /agent/chat (SSE), GET /agent/status, GET /agent/prompts; cancellazione via GeneratorExit → stop_event - frontend/src/pages/AgentPage.tsx: chat page stile ChatGPT con upload file, streaming SSE, badge azioni tool collassabili, Stop button (AbortController) - core/ocr.py: selettore modello OCR (easyocr/vlm/paddleocr/trocr), persistenza .env, _vlm_transcribe streaming, EasyOCR senza preprocessing - backend/routers/rag.py: GET/PUT /rag/ocr-model endpoints - frontend/src/components/layout/Sidebar.tsx: dropdown OCR model in sidebar - backend/database.py: SQLite WAL mode + busy_timeout=10000 via event listener - core/…e1f6f2b
-
feat: ENFSI compliance checker + sidebar model selector
Fabio Antonini +1: Claude Sonnet 4.6- core/compliance.py: new module with 20-item ENFSI BPM checklist, streaming Ollama analysis (system/prompt separation, num_ctx=16384, /no_think for qwen3), and Python-side deterministic summary parsing (verdicts extracted via regex → counts/grid always correct) - backend/routers/compliance.py: POST /compliance/check (PDF upload → SSE) and GET /compliance/status - backend/routers/rag.py: GET /rag/model and PUT /rag/model endpoints for runtime model selection - frontend: CompliancePage, Sidebar configurazione section with model selector dropdown and refresh button, i18n keys (it/en) - docker-compose.yml: add GPU passthrough to ollama service - requirements.txt: add CUDA 12.1 extra-index-url for PyTorch GPU wheels Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c23bac8
-
feat: add React frontend (feature/frontend)
Fabio Antonini +1: Claude Sonnet 4.6Vite + React 19 + TypeScript SPA with: - Tailwind CSS + shadcn/ui-compatible components (Button, Input, Card, Badge) - react-router-dom v7 with protected routes and AppLayout sidebar - zustand auth store (access + refresh token, persisted to localStorage) - axios API client with auto-refresh interceptor on 401 - react-i18next with IT/EN locale files (full translation coverage) - Pages: LoginPage, ProjectsPage, ProjectDetailPage, RagPage - Sidebar with role-aware nav (admin link only for admin role) + language toggle - vite proxy: /api → http://localhost:8000 (dev), nginx proxy (Docker) - Dockerfile: multi-stage build (node:20 → nginx:alpine) with SPA fallback - docker-compose.yml: added frontend service on port 3000 Build: 384 kB JS + 13 kB CSS (gzip: 124 kB + 3.7 kB) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>977221f