toJson method
Serialize to the JSON shape /ad_requests expects.
Implementation
@override
Map<String, dynamic> toJson() => {
'type': 'conversation',
'question': question,
if (answer != null) 'answer': answer,
if (externalConversationId != null)
'external_conversation_id': externalConversationId,
};