chatEventFromJson static method
Implementation
static ChatEvent chatEventFromJson(Map<String, dynamic> json) {
if (json['type'] == 'request') {
return RequestChatEvent(GroqParser.groqMessageFromJson(json['message']));
}
return ResponseChatEvent(
GroqParser.groqResponseFromJson(json['message']),
GroqParser.groqUsageFromJson(json['usage']),
);
}