createClassificationWithHttpInfo method
Future<Response>
createClassificationWithHttpInfo(
- CreateClassificationRequest createClassificationRequest
Classifies the specified query using provided examples. The endpoint first searches over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the completions endpoint. Labeled examples can be provided via an uploaded file, or explicitly listed in the request using the examples parameter for quick tests and small scale use cases.
Note: This method returns the HTTP Response.
Parameters:
- CreateClassificationRequest createClassificationRequest (required):
Implementation
Future<Response> createClassificationWithHttpInfo(CreateClassificationRequest createClassificationRequest,) async {
// ignore: prefer_const_declarations
final path = r'/classifications';
// ignore: prefer_final_locals
Object? postBody = createClassificationRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}