schedule method

Future<DynamiteResponse<TextProcessingApiScheduleResponseApplicationJson, void>> schedule({
  1. required String input,
  2. required String type,
  3. required String appId,
  4. String? identifier,
  5. bool? oCSAPIRequest,
})

This endpoint allows scheduling a language model task.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • input Input text.
  • type Type of the task.
  • appId ID of the app that will execute the task.
  • identifier An arbitrary identifier for the task. Defaults to ''.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Task scheduled successfully
  • 500
  • 400: Scheduling task is not possible
  • 412: Scheduling task is not possible

See:

  • scheduleRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.

Implementation

Future<_i1.DynamiteResponse<TextProcessingApiScheduleResponseApplicationJson, void>> schedule({
  required String input,
  required String type,
  required String appId,
  String? identifier,
  bool? oCSAPIRequest,
}) async {
  final rawResponse = scheduleRaw(
    input: input,
    type: type,
    appId: appId,
    identifier: identifier,
    oCSAPIRequest: oCSAPIRequest,
  );

  return rawResponse.future;
}