pub struct BatchInput {
pub file_id: FileId,
pub endpoint: String,
pub completion_window: String,
pub metadata: Option<Value>,
pub created_by: Option<String>,
pub api_key_id: Option<Uuid>,
pub api_key: Option<String>,
pub total_requests: Option<i64>,
}Expand description
Input parameters for creating a new batch.
Fields§
§file_id: FileIdThe file containing request templates
endpoint: StringThe API endpoint to use for all requests (e.g., “/v1/chat/completions”)
completion_window: StringCompletion window (e.g., “24h”)
metadata: Option<Value>Optional metadata key-value pairs (OpenAI allows up to 16 pairs)
created_by: Option<String>User who created this batch (for ownership tracking)
api_key_id: Option<Uuid>API key UUID that created this batch, for per-member attribution within orgs
api_key: Option<String>API key secret for batch request execution. Used instead of the key in request_templates so that billing is attributed to the batch creator, not the file uploader.
total_requests: Option<i64>Total number of request templates in the file. Set at creation time so the batch immediately reflects the expected request count before population completes.
Trait Implementations§
Source§impl Clone for BatchInput
impl Clone for BatchInput
Source§fn clone(&self) -> BatchInput
fn clone(&self) -> BatchInput
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 BatchInput
impl Debug for BatchInput
Source§impl<'de> Deserialize<'de> for BatchInput
impl<'de> Deserialize<'de> for BatchInput
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
Auto Trait Implementations§
impl Freeze for BatchInput
impl RefUnwindSafe for BatchInput
impl Send for BatchInput
impl Sync for BatchInput
impl Unpin for BatchInput
impl UnsafeUnpin for BatchInput
impl UnwindSafe for BatchInput
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