StreamDirectPredictResponse.fromJson constructor
StreamDirectPredictResponse.fromJson(
- Object? j
Implementation
factory StreamDirectPredictResponse.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return StreamDirectPredictResponse(
outputs: switch (json['outputs']) {
null => [],
List<Object?> $1 => [for (final i in $1) Tensor.fromJson(i)],
_ => throw const FormatException('"outputs" is not a list'),
},
parameters: switch (json['parameters']) {
null => null,
Object $1 => Tensor.fromJson($1),
},
);
}