pub struct GraderLabelModel {
pub name: String,
pub model: String,
pub input: Vec<EvalItem>,
pub labels: Vec<String>,
pub passing_labels: Vec<String>,
}
Expand description
A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
Fields§
§name: String
The name of the grader.
model: String
The model to use for the evaluation. Must support structured outputs.
input: Vec<EvalItem>
§labels: Vec<String>
The labels to assign to each item in the evaluation.
passing_labels: Vec<String>
The labels that indicate a passing result. Must be a subset of labels.
Implementations§
Source§impl GraderLabelModel
impl GraderLabelModel
Sourcepub fn builder() -> GraderLabelModelBuilder<((), (), (), (), ())>
pub fn builder() -> GraderLabelModelBuilder<((), (), (), (), ())>
Create a builder for building GraderLabelModel
.
On the builder, call .name(...)
, .model(...)
, .input(...)
, .labels(...)
, .passing_labels(...)
to set the values of the fields.
Finally, call .build()
to create the instance of GraderLabelModel
.
Trait Implementations§
Source§impl Clone for GraderLabelModel
impl Clone for GraderLabelModel
Source§fn clone(&self) -> GraderLabelModel
fn clone(&self) -> GraderLabelModel
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 GraderLabelModel
impl Debug for GraderLabelModel
Source§impl<'de> Deserialize<'de> for GraderLabelModel
impl<'de> Deserialize<'de> for GraderLabelModel
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
Source§impl PartialEq for GraderLabelModel
impl PartialEq for GraderLabelModel
Source§impl Serialize for GraderLabelModel
impl Serialize for GraderLabelModel
impl StructuralPartialEq for GraderLabelModel
Auto Trait Implementations§
impl Freeze for GraderLabelModel
impl RefUnwindSafe for GraderLabelModel
impl Send for GraderLabelModel
impl Sync for GraderLabelModel
impl Unpin for GraderLabelModel
impl UnwindSafe for GraderLabelModel
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