PredictedIntent.fromJson constructor

PredictedIntent.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PredictedIntent.fromJson(Map<String, dynamic> json) {
  return PredictedIntent(
    intentName: json['intentName'] as String?,
    nluIntentConfidence: json['nluIntentConfidence'] != null
        ? IntentConfidence.fromJson(
            json['nluIntentConfidence'] as Map<String, dynamic>)
        : null,
    slots: (json['slots'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
  );
}