queryNLPTableQA method
Future<List<ApiResponseNLPTableQA?> ?>
queryNLPTableQA({
- required ApiQueryNLPTableQA taskParameters,
- required String model,
queryNLPTableQA
NLP query for the table question answering task. Don’t know SQL? Don’t want to dive into a large spreadsheet? Ask questions in plain english!
taskParameters
Parameter set for the task
[model The model to use for the task
Implementation
Future<List<ApiResponseNLPTableQA?>?> queryNLPTableQA(
{required ApiQueryNLPTableQA taskParameters,
required String model}) async {
final response = await _withHttpInfo(taskParameters.toJson(), model);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return [
(await apiClient.deserializeAsync(
responseBody, 'List<QueryNLPTableQATask>'))
];
}
return null;
}