Backup #1996

ID1996
Dateipfad/var/www/dev.campus.systemische-tools.de/src/Domain/Constants.php
Version4
Typ modified
Größe4.2 KB
Hash6043dad28a155089da35bb78ed2e1902be3d6a351e1921290486752f989cc025
Datum2025-12-28 14:00:09
Geändert vonclaude-code-hook
GrundClaude Code Pre-Hook Backup vor Edit-Operation
Datei existiert Ja

Dateiinhalt

<?php

declare(strict_types=1);

namespace Domain;

// @responsibility: Zentrale benannte Konstanten für Magic Numbers

/**
 * Zentrale Konstanten für das KI-System.
 *
 * Diese Klasse enthält alle häufig verwendeten "Magic Numbers" als
 * benannte Konstanten für bessere Lesbarkeit und Wartbarkeit.
 */
final class Constants
{
    // =========================================================================
    // PAGINATION & LIMITS
    // =========================================================================

    /** Standard-Limit für Datenbankabfragen */
    public const int DEFAULT_LIMIT = 100;

    /** Maximum für Batch-Operationen */
    public const int BATCH_LIMIT = 1000;

    /** Standard-Offset für Pagination */
    public const int DEFAULT_OFFSET = 0;

    // =========================================================================
    // TIME CONVERSIONS
    // =========================================================================

    /** Millisekunden pro Sekunde */
    public const int MS_PER_SECOND = 1000;

    /** Sekunden pro Minute */
    public const int SECONDS_PER_MINUTE = 60;

    /** Minuten pro Stunde */
    public const int MINUTES_PER_HOUR = 60;

    /** Stunden pro Tag */
    public const int HOURS_PER_DAY = 24;

    /** Tage pro Jahr */
    public const int DAYS_PER_YEAR = 365;

    /** Sekunden pro Stunde */
    public const int SECONDS_PER_HOUR = 3600;

    /** Sekunden pro Tag */
    public const int SECONDS_PER_DAY = 86400;

    // =========================================================================
    // PERCENTAGES
    // =========================================================================

    /** 100 Prozent (für Berechnungen) */
    public const int PERCENT_FULL = 100;

    /** 50 Prozent */
    public const int PERCENT_HALF = 50;

    // =========================================================================
    // TIMEOUTS (in Sekunden)
    // =========================================================================

    /** Standard-Timeout für HTTP-Requests */
    public const int HTTP_TIMEOUT = 30;

    /** Timeout für LLM-Anfragen */
    public const int LLM_TIMEOUT = 120;

    /** Health-Check Timeout */
    public const int HEALTH_CHECK_TIMEOUT = 5;

    // =========================================================================
    // FIELD VALIDATION
    // =========================================================================

    /** Maximale Länge für Name-Felder */
    public const int NAME_MAX_LENGTH = 100;

    /** Maximale Länge für Titel-Felder */
    public const int TITLE_MAX_LENGTH = 200;

    /** Minimale Token-Anzahl für LLM-Requests */
    public const int MIN_TOKENS = 100;

    /** Maximale Token-Anzahl für LLM-Requests */
    public const int MAX_TOKENS = 16000;

    // =========================================================================
    // CHUNKING & TEXT
    // =========================================================================

    /** Minimale Chunk-Größe in Zeichen */
    public const int MIN_CHUNK_SIZE = 100;

    /** Maximale Chunk-Größe in Zeichen */
    public const int MAX_CHUNK_SIZE = 2000;

    /** Chunk-Overlap in Prozent */
    public const int CHUNK_OVERLAP_PERCENT = 10;

    /** Maximale Länge für Embedding-Text */
    public const int EMBEDDING_TEXT_LIMIT = 1000;

    // =========================================================================
    // RETRY & BACKOFF
    // =========================================================================

    /** Maximale Anzahl Wiederholungsversuche */
    public const int MAX_RETRIES = 3;

    /** Basis für exponentielles Backoff in Sekunden */
    public const int RETRY_BACKOFF_BASE = 2;

    // =========================================================================
    // SCORE THRESHOLDS
    // =========================================================================

    /** Minimum-Score für "gut" */
    public const int SCORE_GOOD = 80;

    /** Minimum-Score für "akzeptabel" */
    public const int SCORE_ACCEPTABLE = 60;

    /** Hard-Fail Score bei kritischen Issues */
    public const int SCORE_HARD_FAIL = 20;

    // Keine Instanziierung erlaubt
    private function __construct()
    {
    }
}

Vollständig herunterladen

Aktionen

Herunterladen

Andere Versionen dieser Datei

ID Version Typ Größe Datum
1998 5 modified 4.3 KB 2025-12-28 14:01
1996 4 modified 4.2 KB 2025-12-28 14:00
1855 3 modified 4.1 KB 2025-12-27 23:46
1835 2 modified 3.9 KB 2025-12-27 23:19
1826 1 modified 3.5 KB 2025-12-27 23:16

← Zurück zur Übersicht