pub struct CreateBatchRequest {
pub input_file_id: String,
pub endpoint: String,
pub completion_window: CompletionWindow,
pub metadata: Option<HashMap<String, String>>,
pub extra_body_map: Option<Map<String, Value>>,
}Expand description
Creates and executes a batch from an uploaded JSONL file of requests.
Fields§
§input_file_id: StringThe ID of the uploaded JSONL input file.
endpoint: StringThe API endpoint the batch runs against, e.g.
/v1/chat/completions.
completion_window: CompletionWindowThe time window within which the batch should be processed. Only
24h is currently supported.
metadata: Option<HashMap<String, String>>Up to 16 arbitrary key-value metadata pairs attached to the batch.
extra_body_map: Option<Map<String, Value>>Additional JSON properties flattened into the request body, for fields not covered by the typed struct.
Trait Implementations§
Source§impl Clone for CreateBatchRequest
impl Clone for CreateBatchRequest
Source§fn clone(&self) -> CreateBatchRequest
fn clone(&self) -> CreateBatchRequest
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 CreateBatchRequest
impl Debug for CreateBatchRequest
Source§impl Default for CreateBatchRequest
impl Default for CreateBatchRequest
Source§fn default() -> CreateBatchRequest
fn default() -> CreateBatchRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateBatchRequest
impl<'de> Deserialize<'de> for CreateBatchRequest
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 Post for CreateBatchRequest
impl Post for CreateBatchRequest
Source§impl PostNoStream for CreateBatchRequest
impl PostNoStream for CreateBatchRequest
Auto Trait Implementations§
impl Freeze for CreateBatchRequest
impl RefUnwindSafe for CreateBatchRequest
impl Send for CreateBatchRequest
impl Sync for CreateBatchRequest
impl Unpin for CreateBatchRequest
impl UnsafeUnpin for CreateBatchRequest
impl UnwindSafe for CreateBatchRequest
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