pub struct CreateBatchBody {
pub input_file_id: String,
pub endpoint: BatchEndpoint,
pub auto_delete_input_file: Option<bool>,
pub metadata: Option<Value>,
}Expand description
Request body for creating a batch task
Fields§
§input_file_id: StringID of the uploaded .jsonl file (purpose must be “batch”)
endpoint: BatchEndpointEndpoint to be used for all requests in the batch
auto_delete_input_file: Option<bool>Whether to auto delete input file after processing (default: true)
metadata: Option<Value>Arbitrary metadata for task management and tracking (up to 16 kv pairs)
Implementations§
Source§impl CreateBatchBody
impl CreateBatchBody
pub fn new(input_file_id: impl Into<String>, endpoint: BatchEndpoint) -> Self
Sourcepub fn with_auto_delete_input_file(self, v: bool) -> Self
pub fn with_auto_delete_input_file(self, v: bool) -> Self
Set auto delete flag
Sourcepub fn with_metadata(self, v: Value) -> Self
pub fn with_metadata(self, v: Value) -> Self
Set metadata object
Trait Implementations§
Source§impl Clone for CreateBatchBody
impl Clone for CreateBatchBody
Source§fn clone(&self) -> CreateBatchBody
fn clone(&self) -> CreateBatchBody
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateBatchBody
impl Debug for CreateBatchBody
Source§impl<'de> Deserialize<'de> for CreateBatchBody
impl<'de> Deserialize<'de> for CreateBatchBody
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CreateBatchBody
impl Serialize for CreateBatchBody
Source§impl Validate for CreateBatchBody
impl Validate for CreateBatchBody
Source§impl<'v_a> ValidateArgs<'v_a> for CreateBatchBody
impl<'v_a> ValidateArgs<'v_a> for CreateBatchBody
Auto Trait Implementations§
impl Freeze for CreateBatchBody
impl RefUnwindSafe for CreateBatchBody
impl Send for CreateBatchBody
impl Sync for CreateBatchBody
impl Unpin for CreateBatchBody
impl UnwindSafe for CreateBatchBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more