pdf-quiz-generator/backend/app/schemas/admin.py
Daniel 47ba213ae3 Major platform update: pgvector search, multi-provider TTS, settings page, CLI
Features:
- Hybrid semantic + keyword quiz search (pgvector HNSW + PostgreSQL ILIKE)
- AWS Bedrock Titan Embed V2 embeddings via LiteLLM proxy (0.71 cosine sim)
- Multi-provider TTS: OpenAI, AWS Polly (neural), ElevenLabs, Google Cloud TTS
- Unified Settings page (profile, theme, Nextcloud integration, admin shortcuts)
- Good morning/afternoon greeting on dashboard
- manage.py CLI: reset-password, list-users, reembed
- Email verification enforced: register no longer returns JWT for unverified users
- Quiz search with debounced input, semantic/keyword/title modes, highlighted snippets
- TTS button: loading/playing states, voice selector locked during playback
- TTS auto-stops when navigating between questions
- Footer added; mobile quiz nav overflow fixed; markdown theme body selector fixed
- OpenAI Alloy as default TTS voice; favicon added
- SMTP configured via smtp2go; password reset rate limiting (3/hour)
- PostgreSQL upgraded to pgvector/pgvector:pg16

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 18:03:10 +02:00

34 lines
826 B
Python

from datetime import datetime
from pydantic import BaseModel
class AIModelConfigCreate(BaseModel):
model_config = {"protected_namespaces": ()}
name: str
model_id: str
task: str # extraction, tts, general
api_key: str | None = None
is_active: bool = True
is_default: bool = False
class AIModelConfigResponse(BaseModel):
model_config = {"protected_namespaces": (), "from_attributes": True}
id: int
name: str
model_id: str
task: str
is_active: bool
is_default: bool
created_at: datetime
class AIModelConfigUpdate(BaseModel):
model_config = {"protected_namespaces": ()}
name: str | None = None
model_id: str | None = None
task: str | None = None
api_key: str | None = None
is_active: bool | None = None
is_default: bool | None = None