pub struct CreatePredictionRequest {
pub version: String,
pub input: HashMap<String, Value>,
pub webhook: Option<String>,
pub webhook_completed: Option<String>,
pub webhook_events_filter: Option<Vec<String>>,
pub stream: Option<bool>,
pub file_inputs: HashMap<String, FileInput>,
pub file_encoding_strategy: FileEncodingStrategy,
}
Expand description
Request to create a new prediction.
Fields§
§version: String
The version ID of the model to run
input: HashMap<String, Value>
Input parameters for the model
webhook: Option<String>
Optional webhook URL for notifications
webhook_completed: Option<String>
Optional webhook URL for completion notifications
webhook_events_filter: Option<Vec<String>>
Events to filter for webhooks
stream: Option<bool>
Enable streaming of output
file_inputs: HashMap<String, FileInput>
File inputs that need to be processed
file_encoding_strategy: FileEncodingStrategy
File encoding strategy
Implementations§
Source§impl CreatePredictionRequest
impl CreatePredictionRequest
Sourcepub fn with_input(self, key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn with_input(self, key: impl Into<String>, value: impl Into<Value>) -> Self
Add an input parameter
Sourcepub fn with_webhook(self, webhook: impl Into<String>) -> Self
pub fn with_webhook(self, webhook: impl Into<String>) -> Self
Set the webhook URL
Sourcepub fn with_streaming(self) -> Self
pub fn with_streaming(self) -> Self
Enable streaming
Trait Implementations§
Source§impl Clone for CreatePredictionRequest
impl Clone for CreatePredictionRequest
Source§fn clone(&self) -> CreatePredictionRequest
fn clone(&self) -> CreatePredictionRequest
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 CreatePredictionRequest
impl Debug for CreatePredictionRequest
Auto Trait Implementations§
impl Freeze for CreatePredictionRequest
impl RefUnwindSafe for CreatePredictionRequest
impl Send for CreatePredictionRequest
impl Sync for CreatePredictionRequest
impl Unpin for CreatePredictionRequest
impl UnwindSafe for CreatePredictionRequest
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