pub struct PersistedModelTurn {
pub content: Vec<PersistedAssistantPart>,
pub provider_options: BTreeMap<String, Value>,
pub finish_reason: ModelFinishReason,
pub usage: Usage,
pub response_metadata: SafeModelMetadata,
pub provider_metadata: SafeModelMetadata,
pub native_replay: Option<NativeReplayArtifact>,
}Fields§
§content: Vec<PersistedAssistantPart>§provider_options: BTreeMap<String, Value>§finish_reason: ModelFinishReason§usage: Usage§response_metadata: SafeModelMetadata§provider_metadata: SafeModelMetadata§native_replay: Option<NativeReplayArtifact>Implementations§
Source§impl PersistedModelTurn
impl PersistedModelTurn
pub const MAX_SERIALIZED_BYTES: usize
pub fn validate(&self) -> Result<(), EventSchemaError>
pub fn validate_for( &self, resolved: &ResolvedModelRef, ) -> Result<(), EventSchemaError>
Trait Implementations§
Source§impl Clone for PersistedModelTurn
impl Clone for PersistedModelTurn
Source§fn clone(&self) -> PersistedModelTurn
fn clone(&self) -> PersistedModelTurn
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 PersistedModelTurn
impl Debug for PersistedModelTurn
Source§impl<'de> Deserialize<'de> for PersistedModelTurn
impl<'de> Deserialize<'de> for PersistedModelTurn
Source§fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for PersistedModelTurn
impl JsonSchema for PersistedModelTurn
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for PersistedModelTurn
impl PartialEq for PersistedModelTurn
Source§fn eq(&self, other: &PersistedModelTurn) -> bool
fn eq(&self, other: &PersistedModelTurn) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PersistedModelTurn
impl Serialize for PersistedModelTurn
impl StructuralPartialEq for PersistedModelTurn
Auto Trait Implementations§
impl Freeze for PersistedModelTurn
impl RefUnwindSafe for PersistedModelTurn
impl Send for PersistedModelTurn
impl Sync for PersistedModelTurn
impl Unpin for PersistedModelTurn
impl UnsafeUnpin for PersistedModelTurn
impl UnwindSafe for PersistedModelTurn
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