class

OpenAI::CreateBatchRequestBody

Inherits JSON::Serializable < Reference < Object

Constructors

new(input_file_id : String = "", endpoint : CreateBatchRequestBodyEndpoint = CreateBatchRequestBodyEndpoint::V1Responses, completion_window : CreateBatchRequestBodyCompletionWindow = CreateBatchRequestBodyCompletionWindow::N24H, metadata : Metadata | Nil = nil, output_expires_after : BatchFileExpirationAfter | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

completion_window

The time frame within which the batch should be processed. Currently only 24h is supported.

Source
completion_window=(completion_window : CreateBatchRequestBodyCompletionWindow)

The time frame within which the batch should be processed. Currently only 24h is supported.

Source
endpoint

The endpoint to be used for all requests in the batch. Currently /v1/responses, /v1/chat/completions, /v1/embeddings, /v1/completions, and /v1/moderations are supported. Note that /v1/embeddings batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.

Source
endpoint=(endpoint : CreateBatchRequestBodyEndpoint)

The endpoint to be used for all requests in the batch. Currently /v1/responses, /v1/chat/completions, /v1/embeddings, /v1/completions, and /v1/moderations are supported. Note that /v1/embeddings batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.

Source
input_file_id

The ID of an uploaded file that contains requests for the new batch.

See upload file for how to upload a file.

Your input file must be formatted as a JSONL file, and must be uploaded with the purpose batch. The file can contain up to 50,000 requests, and can be up to 200 MB in size.

Source
input_file_id=(input_file_id : String)

The ID of an uploaded file that contains requests for the new batch.

See upload file for how to upload a file.

Your input file must be formatted as a JSONL file, and must be uploaded with the purpose batch. The file can contain up to 50,000 requests, and can be up to 200 MB in size.

Source
metadata
Source
metadata=(metadata : Metadata | Nil)
Source
output_expires_after
Source
output_expires_after=(output_expires_after : BatchFileExpirationAfter | Nil)
Source