FEATURE #47: Wertetabelle nach KI-Analysen - Migration 021: metadata JSONB column in ai_insights - Backend sammelt resolved placeholders mit descriptions beim Speichern - Frontend: Collapsible value table in InsightCard - Zeigt: Platzhalter | Wert | Beschreibung - Sortiert tabellarisch - Funktioniert für base + pipeline prompts FEATURE #48: {{placeholder|d}} Modifier - Syntax: {{weight_aktuell|d}} → "85.2 kg (Aktuelles Gewicht in kg)" - resolve_placeholders() erkennt |d modifier - Hängt description aus catalog an Wert - Fein-granulare Kontrolle pro Platzhalter (nicht global) - Optional: nur wo sinnvoll einsetzen TECHNICAL: - prompt_executor.py: catalog parameter durchgereicht - execute_prompt_with_data() lädt catalog via get_placeholder_catalog() - Catalog als _catalog in variables übergeben, in execute_prompt() extrahiert - Base + Pipeline Prompts unterstützen |d modifier EXAMPLE: Template: "Gewicht: {{weight_aktuell|d}}, Alter: {{age}}" Output: "Gewicht: 85.2 kg (Aktuelles Gewicht in kg), Alter: 55" version: 9.6.0 (feature) module: prompts 2.1.0, insights 1.4.0
8 lines
356 B
SQL
8 lines
356 B
SQL
-- Migration 021: Add metadata column to ai_insights for storing debug info
|
|
-- Date: 2026-03-26
|
|
-- Purpose: Store resolved placeholder values with descriptions for transparency
|
|
|
|
ALTER TABLE ai_insights ADD COLUMN IF NOT EXISTS metadata JSONB DEFAULT NULL;
|
|
|
|
COMMENT ON COLUMN ai_insights.metadata IS 'Debug info: resolved placeholders, descriptions, etc.';
|