UNPKG

@callmedayz/ai-prompt-toolkit

Version:

Professional AI prompt engineering toolkit with advanced template features, real-time dashboards, conditional logic, template inheritance, live monitoring, OpenRouter integration, and 310+ model support

105 lines 2.77 kB
import { PromptAnalytics } from './prompt-analytics'; import { RealTimeDashboard } from './real-time-dashboard'; import { RealTimeMetric, LiveMonitoringEvent } from './types'; /** * Enhanced Analytics System with Real-time Monitoring * Extends the base PromptAnalytics with real-time capabilities */ export declare class EnhancedAnalytics extends PromptAnalytics { private dashboard; private anomalyDetector; private alertManager; private isRealTimeEnabled; constructor(config?: any, client?: any); /** * Enable real-time monitoring */ enableRealTimeMonitoring(): void; /** * Disable real-time monitoring */ disableRealTimeMonitoring(): void; /** * Override recordExecution to add real-time features */ recordExecution(execution: any, model: any): void; /** * Get the dashboard instance */ getDashboard(): RealTimeDashboard; /** * Get real-time metrics summary */ getRealTimeMetrics(): RealTimeMetric[]; /** * Get live monitoring events */ getLiveEvents(limit?: number, severity?: string): LiveMonitoringEvent[]; /** * Add custom monitoring event */ addMonitoringEvent(event: Omit<LiveMonitoringEvent, 'id' | 'timestamp'>): void; /** * Update real-time metrics based on execution */ private updateRealTimeMetrics; /** * Check for anomalies in the execution */ private checkForAnomalies; /** * Update dashboard metrics */ private updateDashboardMetrics; /** * Get recent executions for real-time calculations */ private getRecentExecutions; /** * Get historical data for anomaly detection */ private getHistoricalData; } /** * Anomaly Detection System */ export declare class AnomalyDetector { private thresholds; /** * Detect anomalies in execution data */ detectAnomalies(execution: any, historicalData: any[]): Anomaly[]; private detectResponseTimeAnomaly; private detectCostAnomaly; private detectSuccessRateAnomaly; } /** * Alert Management System */ export declare class AlertManager { private alertRules; /** * Check alert thresholds */ checkThresholds(execution: any, metrics: RealTimeMetric[]): Alert[]; private formatMetricValue; } interface Anomaly { type: string; severity: 'low' | 'medium' | 'high'; description: string; value: number; threshold: number; confidence: number; } interface Alert { id: string; severity: 'low' | 'medium' | 'high'; title: string; description: string; metric: string; threshold: number; currentValue: number; } export {}; //# sourceMappingURL=enhanced-analytics.d.ts.map