pub struct ExampleMetadata {
pub source_id: Option<String>,
pub timestamp: Option<DateTime<Utc>>,
pub teacher_model: Option<String>,
pub labeled_at: Option<DateTime<Utc>>,
pub teacher_confidence: Option<f32>,
pub extra: Option<Value>,
}Expand description
Metadata about a training example
Provides traceability back to the source data.
Fields§
§source_id: Option<String>Source conversation or session ID
timestamp: Option<DateTime<Utc>>Timestamp when the original message was created
teacher_model: Option<String>Teacher model that generated the labels
labeled_at: Option<DateTime<Utc>>Teacher generation timestamp
teacher_confidence: Option<f32>Confidence of the teacher’s labels (0-1)
extra: Option<Value>Additional metadata as key-value pairs
Implementations§
Source§impl ExampleMetadata
impl ExampleMetadata
Sourcepub fn with_source(source_id: impl Into<String>) -> Self
pub fn with_source(source_id: impl Into<String>) -> Self
Create metadata with source ID
Sourcepub fn labeled_at(self, ts: DateTime<Utc>) -> Self
pub fn labeled_at(self, ts: DateTime<Utc>) -> Self
Set the labeled_at timestamp
Sourcepub fn confidence(self, conf: f32) -> Self
pub fn confidence(self, conf: f32) -> Self
Set teacher confidence
Trait Implementations§
Source§impl Clone for ExampleMetadata
impl Clone for ExampleMetadata
Source§fn clone(&self) -> ExampleMetadata
fn clone(&self) -> ExampleMetadata
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 ExampleMetadata
impl Debug for ExampleMetadata
Source§impl Default for ExampleMetadata
impl Default for ExampleMetadata
Source§fn default() -> ExampleMetadata
fn default() -> ExampleMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExampleMetadata
impl<'de> Deserialize<'de> for ExampleMetadata
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 ExampleMetadata
impl RefUnwindSafe for ExampleMetadata
impl Send for ExampleMetadata
impl Sync for ExampleMetadata
impl Unpin for ExampleMetadata
impl UnsafeUnpin for ExampleMetadata
impl UnwindSafe for ExampleMetadata
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