pub struct BatchCreateBody {
pub input_file_id: String,
pub endpoint: BatchEndpoint,
pub auto_delete_input_file: Option<bool>,
pub metadata: Option<BTreeMap<String, String>>,
}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<BTreeMap<String, String>>String metadata for task management and tracking (up to 16 key-value pairs).
Implementations§
Source§impl BatchCreateBody
impl BatchCreateBody
Sourcepub fn new(input_file_id: impl Into<String>, endpoint: BatchEndpoint) -> Self
pub fn new(input_file_id: impl Into<String>, endpoint: BatchEndpoint) -> Self
Create a new batch body from an input file id and target endpoint
(auto-delete defaults to true).
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: BTreeMap<String, String>) -> Self
pub fn with_metadata(self, v: BTreeMap<String, String>) -> Self
Set string metadata.
Trait Implementations§
Source§impl Clone for BatchCreateBody
impl Clone for BatchCreateBody
Source§fn clone(&self) -> BatchCreateBody
fn clone(&self) -> BatchCreateBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BatchCreateBody
impl Debug for BatchCreateBody
Source§impl<'de> Deserialize<'de> for BatchCreateBody
impl<'de> Deserialize<'de> for BatchCreateBody
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 BatchCreateBody
impl Serialize for BatchCreateBody
Source§impl Validate for BatchCreateBody
impl Validate for BatchCreateBody
Source§impl<'v_a> ValidateArgs<'v_a> for BatchCreateBody
impl<'v_a> ValidateArgs<'v_a> for BatchCreateBody
Auto Trait Implementations§
impl Freeze for BatchCreateBody
impl RefUnwindSafe for BatchCreateBody
impl Send for BatchCreateBody
impl Sync for BatchCreateBody
impl Unpin for BatchCreateBody
impl UnsafeUnpin for BatchCreateBody
impl UnwindSafe for BatchCreateBody
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