#[non_exhaustive]pub struct ModelCompletedParams {
pub command_id: String,
pub outcome: ModelCompleteOutcome,
pub text: Option<String>,
pub stop_reason: Option<ModelCompleteStopReason>,
pub model_id: Option<String>,
pub usage: Option<ModelCompleteUsage>,
pub message: Option<String>,
}Expand description
model/completed params. text, stopReason, modelId and usage ride
completed (usage only when the provider reported counts); message
rides failed; cancelled and timedOut carry neither. The struct marks
the conditional members optional; the SS prose pins the per-outcome rule.
text is untrusted model output.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.command_id: StringThe request’s id — the correlation key.
outcome: ModelCompleteOutcomeHow the call settled.
text: Option<String>The model’s answer, verbatim (on completed).
stop_reason: Option<ModelCompleteStopReason>Why the model stopped (on completed).
model_id: Option<String>The model/list id of the model that ran (on completed).
usage: Option<ModelCompleteUsage>The provider’s counts (on completed, when it reported them).
message: Option<String>Why the call failed, in words (on failed).
Trait Implementations§
Source§impl Clone for ModelCompletedParams
impl Clone for ModelCompletedParams
Source§impl Debug for ModelCompletedParams
impl Debug for ModelCompletedParams
Source§impl<'de> Deserialize<'de> for ModelCompletedParams
impl<'de> Deserialize<'de> for ModelCompletedParams
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
impl Eq for ModelCompletedParams
Source§impl PartialEq for ModelCompletedParams
impl PartialEq for ModelCompletedParams
Source§impl Serialize for ModelCompletedParams
impl Serialize for ModelCompletedParams
impl StructuralPartialEq for ModelCompletedParams
Auto Trait Implementations§
impl Forget for ModelCompletedParams
impl Freeze for ModelCompletedParams
impl Move for ModelCompletedParams
impl RefUnwindSafe for ModelCompletedParams
impl Send for ModelCompletedParams
impl Sync for ModelCompletedParams
impl Unpin for ModelCompletedParams
impl UnsafeUnpin for ModelCompletedParams
impl UnwindSafe for ModelCompletedParams
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