textClassification method
Future<List>
textClassification({
- required dynamic inputs,
- required String model,
- dynamic options,
Implementation
Future<List<dynamic>> textClassification(
{required dynamic inputs, required String model, dynamic options}) async {
Map<String, dynamic> queryParams = {
'inputs': inputs,
};
if (options != null) {
queryParams.addAll(options);
}
final response = await httpService.makeRequest(queryParams, model);
handleHttpError(response);
dynamic decodedResponse = json.decode(response.body);
return decodedResponse;
}