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