pub struct TrainingExample {
pub input: String,
pub target: String,
pub reasoning_chain: Option<Vec<String>>,
pub problem_type: ProblemType,
}Expand description
Individual training example
Fields§
§input: String§target: String§reasoning_chain: Option<Vec<String>>§problem_type: ProblemTypeImplementations§
Source§impl TrainingExample
impl TrainingExample
Sourcepub fn new(input: String, target: String, problem_type: ProblemType) -> Self
pub fn new(input: String, target: String, problem_type: ProblemType) -> Self
Create a new training example
Sourcepub fn with_reasoning(
input: String,
target: String,
reasoning_chain: Vec<String>,
problem_type: ProblemType,
) -> Self
pub fn with_reasoning( input: String, target: String, reasoning_chain: Vec<String>, problem_type: ProblemType, ) -> Self
Create a training example with reasoning chain
Trait Implementations§
Source§impl Clone for TrainingExample
impl Clone for TrainingExample
Source§fn clone(&self) -> TrainingExample
fn clone(&self) -> TrainingExample
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 TrainingExample
impl Debug for TrainingExample
Source§impl<'de> Deserialize<'de> for TrainingExample
impl<'de> Deserialize<'de> for TrainingExample
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 TrainingExample
impl RefUnwindSafe for TrainingExample
impl Send for TrainingExample
impl Sync for TrainingExample
impl Unpin for TrainingExample
impl UnwindSafe for TrainingExample
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