mirror of
https://github.com/ferdzo/iotDashboard.git
synced 2026-04-05 17:16:26 +00:00
Introduced GPT/AI service, added dashboard widgets, drag and drop, export import.
This commit is contained in:
@@ -59,6 +59,19 @@ export const telemetryApi = {
|
||||
apiClient.get<PaginatedResponse<Telemetry>>('/telemetry/latest/', { params }),
|
||||
|
||||
getMetrics: () => apiClient.get<{ metrics: string[] }>('/telemetry/metrics/'),
|
||||
|
||||
analyze: (data: {
|
||||
device_id: string;
|
||||
metric?: string;
|
||||
hours?: number;
|
||||
limit?: number;
|
||||
prompt_type?: 'anomaly_detection' | 'trend_summary' | 'custom';
|
||||
custom_prompt?: string;
|
||||
}) => apiClient.post<{
|
||||
analysis: string;
|
||||
prompt_type: string;
|
||||
data_points_analyzed: number;
|
||||
}>('/telemetry/analyze/', data),
|
||||
};
|
||||
|
||||
// Dashboard API
|
||||
|
||||
Reference in New Issue
Block a user