listFineTuneEventsWithHttpInfo method

Future<Response> listFineTuneEventsWithHttpInfo(
  1. String fineTuneId, {
  2. bool? stream,
})

Get fine-grained status updates for a fine-tune job.

Note: This method returns the HTTP Response.

Parameters:

  • String fineTuneId (required): The ID of the fine-tune job to get events for.

  • bool stream: Whether to stream events for the fine-tune job. If set to true, events will be sent as data-only server-sent events as they become available. The stream will terminate with a data: [DONE] message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned.

Implementation

Future<Response> listFineTuneEventsWithHttpInfo(String fineTuneId, { bool? stream, }) async {
  // ignore: prefer_const_declarations
  final path = r'/fine-tunes/{fine_tune_id}/events'
    .replaceAll('{fine_tune_id}', fineTuneId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (stream != null) {
    queryParams.addAll(_queryParams('', 'stream', stream));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}