pub struct BatchRequest {
pub input_file_id: String,
pub endpoint: BatchEndpoint,
pub completion_window: BatchCompletionWindow,
pub metadata: Option<HashMap<String, Value>>,
pub output_expires_after: Option<BatchFileExpirationAfter>,
}batch-types only.Fields§
§input_file_id: StringThe 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: BatchEndpointThe 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.
completion_window: BatchCompletionWindowThe time frame within which the batch should be processed. Currently only 24h is supported.
metadata: Option<HashMap<String, Value>>Optional custom metadata for the batch.
output_expires_after: Option<BatchFileExpirationAfter>The expiration policy for the output and/or error file that are generated for a batch.
Trait Implementations§
Source§impl Clone for BatchRequest
impl Clone for BatchRequest
Source§fn clone(&self) -> BatchRequest
fn clone(&self) -> BatchRequest
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BatchRequest
impl Debug for BatchRequest
Source§impl Default for BatchRequest
impl Default for BatchRequest
Source§fn default() -> BatchRequest
fn default() -> BatchRequest
Source§impl<'de> Deserialize<'de> for BatchRequest
impl<'de> Deserialize<'de> for BatchRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for BatchRequest
impl PartialEq for BatchRequest
Source§impl Serialize for BatchRequest
impl Serialize for BatchRequest
impl StructuralPartialEq for BatchRequest
Auto Trait Implementations§
impl Freeze for BatchRequest
impl RefUnwindSafe for BatchRequest
impl Send for BatchRequest
impl Sync for BatchRequest
impl Unpin for BatchRequest
impl UnwindSafe for BatchRequest
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)