AiRecentCall.fromJson constructor

AiRecentCall.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory AiRecentCall.fromJson(Map<String, Object?> json) => AiRecentCall(
  at: json['at'] as String,
  feature: json['feature'] as String,
  label: json['label'] as String,
  tier: AiTier.fromWire(json['tier'] as String),
  model: json['model'] as String,
  environment: AiSurface.fromWire(json['environment'] as String),
  outcome: AiCallOutcome.fromWire(json['outcome'] as String),
  latencyMs: (json['latencyMs'] as num).toInt(),
  costUsd: (json['costUsd'] as num).toDouble(),
);