pub struct Prediction {Show 13 fields
pub id: String,
pub model: String,
pub version: String,
pub status: PredictionStatus,
pub input: Option<HashMap<String, Value>>,
pub output: Option<Value>,
pub logs: Option<String>,
pub error: Option<String>,
pub metrics: Option<HashMap<String, Value>>,
pub created_at: Option<String>,
pub started_at: Option<String>,
pub completed_at: Option<String>,
pub urls: Option<PredictionUrls>,
}
Expand description
A prediction made by a model hosted on Replicate.
Fields§
§id: String
The unique ID of the prediction
model: String
The model used to create the prediction (format: owner/name)
version: String
The version ID of the model used
status: PredictionStatus
The current status of the prediction
input: Option<HashMap<String, Value>>
The input parameters for the prediction
output: Option<Value>
The output of the prediction (if completed)
logs: Option<String>
Logs from the prediction execution
error: Option<String>
Error message if the prediction failed
metrics: Option<HashMap<String, Value>>
Metrics about the prediction performance
created_at: Option<String>
When the prediction was created
started_at: Option<String>
When the prediction started processing
completed_at: Option<String>
When the prediction completed
urls: Option<PredictionUrls>
URLs associated with the prediction
Implementations§
Source§impl Prediction
impl Prediction
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if the prediction is complete
Sourcepub fn is_successful(&self) -> bool
pub fn is_successful(&self) -> bool
Check if the prediction succeeded
Sourcepub fn is_canceled(&self) -> bool
pub fn is_canceled(&self) -> bool
Check if the prediction was canceled
Trait Implementations§
Source§impl Clone for Prediction
impl Clone for Prediction
Source§fn clone(&self) -> Prediction
fn clone(&self) -> Prediction
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 Prediction
impl Debug for Prediction
Source§impl<'de> Deserialize<'de> for Prediction
impl<'de> Deserialize<'de> for Prediction
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 Prediction
impl RefUnwindSafe for Prediction
impl Send for Prediction
impl Sync for Prediction
impl Unpin for Prediction
impl UnwindSafe for Prediction
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