textClassification method

Future<List> textClassification({
  1. required dynamic inputs,
  2. required String model,
  3. 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;
}