fromJson static method
Implementation
static AgentInputContent fromJson(Map<String, dynamic> json) {
switch (json['type']) {
case 'text':
return AgentTextContent.fromJson(json);
case 'file':
return AgentFileContent.fromJson(json);
}
throw ArgumentError.value(json['type'], 'json[type]', 'unsupported agent input content type');
}