ResponseTextDeltaEvent.fromJson constructor

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

Creates a ResponseTextDeltaEvent from JSON.

Implementation

factory ResponseTextDeltaEvent.fromJson(Map<String, dynamic> json) {
  return ResponseTextDeltaEvent(
    eventId: json['event_id'] as String,
    responseId: json['response_id'] as String,
    itemId: json['item_id'] as String,
    outputIndex: json['output_index'] as int,
    contentIndex: json['content_index'] as int,
    delta: json['delta'] as String,
  );
}