Batch

io.cequence.openaiscala.domain.Batch$
object Batch

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Batch.type

Members list

Concise view

Type members

Classlikes

case class Batch(id: String, `object`: String, endpoint: BatchEndpoint, errors: Option[BatchProcessingErrors], input_file_id: String, completion_window: CompletionWindow, status: String, output_file_id: Option[String], error_file_id: Option[String], created_at: Long, in_progress_at: Option[Long], expires_at: Option[Long], finalizing_at: Option[Long], completed_at: Option[Long], failed_at: Option[Long], expired_at: Option[Long], cancelling_at: Option[Long], cancelled_at: Option[Long], request_counts: Map[String, Int], metadata: Option[Map[String, String]])

Represents a Batch object returned by the OpenAI API.

Represents a Batch object returned by the OpenAI API.

Attributes

cancelled_at

The Unix timestamp (in seconds) for when the batch was cancelled, if available.

cancelling_at

The Unix timestamp (in seconds) for when the batch started cancelling, if available.

completed_at

The Unix timestamp (in seconds) for when the batch was completed, if available.

completion_window

The time frame within which the batch should be processed.

created_at

The Unix timestamp (in seconds) for when the batch was created.

endpoint

The OpenAI API endpoint used by the batch.

error_file_id

The ID of the file containing the outputs of requests with errors, if available.

errors

Map of errors, if any occurred during the batch processing.

expired_at

The Unix timestamp (in seconds) for when the batch expired, if available.

expires_at

The Unix timestamp (in seconds) for when the batch will expire, if available.

failed_at

The Unix timestamp (in seconds) for when the batch failed, if available.

finalizing_at

The Unix timestamp (in seconds) for when the batch started finalizing, if available.

id

The ID of the batch.

in_progress_at

The Unix timestamp (in seconds) for when the batch started processing, if available.

input_file_id

The ID of the input file for the batch.

metadata

Optional metadata as a map. This can be useful for storing additional information about the batch in a structured format.

object

The object type, which is always "batch".

output_file_id

The ID of the file containing the outputs of successfully executed requests, if available.

request_counts

Map detailing the counts of requests by their status within the batch.

status

The current status of the batch.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
sealed abstract class BatchEndpoint extends EnumValue

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object /v1/embeddings.type

Attributes

Companion:
class
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class BatchProcessingError(code: String, message: String, param: Option[String], line: Option[Int])

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class BatchProcessingErrors(`object`: String, data: Seq[BatchProcessingError])

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class BatchRow(custom_id: String, method: String, url: String, body: Map[String, Seq[BaseMessage]])

Represents a request in a batch. The per-line object of the batch input file

Represents a request in a batch. The per-line object of the batch input file

Attributes

body

The per-line object of the batch input file.

custom_id

A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.

method

The HTTP method to be used for the request. Currently only POST is supported.

url

The OpenAI API relative URL to be used for the request. Currently /v1/chat/completions and /v1/embeddings are supported.

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object BatchRow

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class BatchRowBase(custom_id: String, url: String, messages: Seq[BaseMessage])

Simplification of the BatchRow as method is always POST and the model should be the same for all the requests in one batch.

Simplification of the BatchRow as method is always POST and the model should be the same for all the requests in one batch.

Attributes

custom_id

A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.

messages

Messages for either chat completions or embeddings.

url

The OpenAI API relative URL to be used for the request. Currently /v1/chat/completions and /v1/embeddings are supported.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
sealed abstract class CompletionWindow extends EnumValue

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object 24h.type

Attributes

Companion:
class
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type