zeroShotClassification method

Future<List> zeroShotClassification({
  1. required List inputs,
  2. required dynamic parameters,
  3. required String model,
  4. dynamic options,
})

Implementation

Future<List<dynamic>> zeroShotClassification(
    {required List<dynamic> inputs,
    required dynamic parameters,
    required String model,
    dynamic options}) async {
  Map<String, dynamic> queryParams = {
    'inputs': inputs,
    'parameters': parameters
  };
  if (options != null) {
    queryParams.addAll(options);
  }

  final response = await httpService.makeRequest(queryParams, model);
  handleHttpError(response);

  dynamic decodedResponse = json.decode(response.body);
  return decodedResponse;
}