Settings > Tickets says to triage new * tickets with AI, it asks the Tickets model (or General's) about the tickets * that came in by email, the portal or the API and haven't been triaged - up * to five a run, so a slow provider never holds the next minute up - and * suggests or fills in their category and priority (aiTriageNewTickets(), * functions/ai_ticket.php). Off, or with no model, it does nothing. */ // Read the master switch here rather than trusting a global - see the cron rules in CONTRIBUTING.md $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT config_enable_cron FROM settings WHERE company_id = 1")); if (intval($row['config_enable_cron'] ?? 0) === 0) { cronJobStop("Cron: is not enabled -- Quitting.."); } [$triaged, $failed] = aiTriageNewTickets(5); if ($failed) { logApp('AI', 'warning', "AI triage: $failed new ticket" . ($failed === 1 ? '' : 's') . " couldn't be triaged - see AI Usage"); } if ($triaged || $failed) { echo "AI triage: $triaged triaged, $failed failed\n"; }