pub struct CreateBatchParams {
pub model: String,
pub requests: Vec<BatchRequestItem>,
pub completion_window: Option<String>,
pub metadata: Option<HashMap<String, String>>,
}Expand description
Parameters for creating a batch job.
Fields§
§model: StringThe model to use, in provider:model format (e.g., “openai:gpt-4o-mini”).
requests: Vec<BatchRequestItem>The list of requests to process.
completion_window: Option<String>The time window for batch completion (e.g., “24h”).
metadata: Option<HashMap<String, String>>User-provided metadata key-value pairs.
Implementations§
Source§impl CreateBatchParams
impl CreateBatchParams
Sourcepub fn new(model: impl Into<String>, requests: Vec<BatchRequestItem>) -> Self
pub fn new(model: impl Into<String>, requests: Vec<BatchRequestItem>) -> Self
Create new batch params with required fields.
Sourcepub fn completion_window(self, window: impl Into<String>) -> Self
pub fn completion_window(self, window: impl Into<String>) -> Self
Set the completion window (e.g., “24h”).
Trait Implementations§
Source§impl Clone for CreateBatchParams
impl Clone for CreateBatchParams
Source§fn clone(&self) -> CreateBatchParams
fn clone(&self) -> CreateBatchParams
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 CreateBatchParams
impl Debug for CreateBatchParams
Auto Trait Implementations§
impl Freeze for CreateBatchParams
impl RefUnwindSafe for CreateBatchParams
impl Send for CreateBatchParams
impl Sync for CreateBatchParams
impl Unpin for CreateBatchParams
impl UnsafeUnpin for CreateBatchParams
impl UnwindSafe for CreateBatchParams
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