pub struct CreateBatchRequest {
pub input_file_id: String,
pub endpoint: CreateBatchRequestEndpoint,
pub completion_window: CreateBatchRequestCompletionWindow,
pub metadata: Option<Metadata>,
}
Fields§
§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.
endpoint: CreateBatchRequestEndpoint
The endpoint to be used for all requests in the batch. Currently /v1/responses
, /v1/chat/completions
, /v1/embeddings
, and /v1/completions
are supported. Note that /v1/embeddings
batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.
completion_window: CreateBatchRequestCompletionWindow
The time frame within which the batch should be processed. Currently only 24h
is supported.
metadata: Option<Metadata>
Implementations§
Source§impl CreateBatchRequest
impl CreateBatchRequest
Sourcepub fn builder() -> CreateBatchRequestBuilder<((), (), (), ())>
pub fn builder() -> CreateBatchRequestBuilder<((), (), (), ())>
Create a builder for building CreateBatchRequest
.
On the builder, call .input_file_id(...)
, .endpoint(...)
, .completion_window(...)
, .metadata(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of CreateBatchRequest
.
Trait Implementations§
Source§impl Clone for CreateBatchRequest
impl Clone for CreateBatchRequest
Source§fn clone(&self) -> CreateBatchRequest
fn clone(&self) -> CreateBatchRequest
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more