mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 19:36:20 -05:00
ai: ai.yaml config, model catalog, and the GGUF downloader
ai.yaml is the source of truth (opt-in: enabled=False by default) with active model, idle-unload minutes, context override, and tool-call bound. The model catalog follows the map pattern: a bundled constant keeps the Manage tab working offline, the CDN manifest (ai/models.json + detached GPG signature) wins when reachable. GGUF downloads clone the map-extract flow — the per-file meta4 is GPG-verified once and the same bytes handed to aria2c, so the verified hash is the enforced one; unverified downloads are refused. Models land in <media>/ai/models/ (gated by the existing media_mounted download rules). Manage endpoints (catalog with RAM-tier recommendation, settings) live under /api/ai/manage/ which the future agent loop excludes from its tool catalog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
c837c1a268
commit
164e98553d
10 changed files with 593 additions and 3 deletions
|
|
@ -55,6 +55,14 @@ class AIHelpSearchRequest:
|
|||
limit: int = 5
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class AIManageSettingsRequest:
|
||||
enabled: Optional[bool] = None
|
||||
active_model: Optional[str] = None
|
||||
idle_unload_minutes: Optional[int] = None
|
||||
context_size: Optional[int] = None
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class AISearchResponse:
|
||||
results: list = dataclasses.field(default_factory=list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue