ExBifrost.Api.Batch (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Batch.

Summary

Functions

Cancel a batch job Cancels a batch job.

Create a batch job Creates a batch job for asynchronous processing.

Get batch results Retrieves results from a completed batch job.

List batch jobs Lists batch jobs for a provider.

Retrieve a batch job Retrieves a specific batch job by ID.

Functions

cancel_batch(connection, batch_id, provider, opts \\ [])

Cancel a batch job Cancels a batch job.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • batch_id (String.t): The ID of the batch to cancel
  • provider (ModelProvider): The provider of the batch
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.CancelBatch200Response.t} on success
  • {:error, Tesla.Env.t} on failure

create_batch(connection, batch_create_request, opts \\ [])

Create a batch job Creates a batch job for asynchronous processing.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • batch_create_request (BatchCreateRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.BatchCreateResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_batch_results(connection, batch_id, provider, opts \\ [])

Get batch results Retrieves results from a completed batch job.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • batch_id (String.t): The ID of the batch
  • provider (ModelProvider): The provider of the batch
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.GetBatchResults200Response.t} on success
  • {:error, Tesla.Env.t} on failure

list_batches(connection, provider, opts \\ [])

List batch jobs Lists batch jobs for a provider.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • provider (ModelProvider): Provider to list batches for
  • opts (keyword): Optional parameters
    • :limit (integer()): Maximum number of batches to return
    • :after (String.t): Cursor for pagination
    • :before (String.t): Cursor for pagination

Returns

  • {:ok, ExBifrost.Model.BatchListResponse.t} on success
  • {:error, Tesla.Env.t} on failure

retrieve_batch(connection, batch_id, provider, opts \\ [])

Retrieve a batch job Retrieves a specific batch job by ID.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • batch_id (String.t): The ID of the batch to retrieve
  • provider (ModelProvider): The provider of the batch
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.BatchRetrieveResponse.t} on success
  • {:error, Tesla.Env.t} on failure