pub struct GraderScoreModel {
pub name: String,
pub model: String,
pub sampling_params: Option<IndexMap<String, Value>>,
pub input: Vec<EvalItem>,
pub range: Option<Vec<Number>>,
}
Expand description
A ScoreModelGrader object that uses a model to assign a score to the input.
Fields§
§name: String
The name of the grader.
model: String
The model to use for the evaluation.
sampling_params: Option<IndexMap<String, Value>>
The sampling parameters for the model.
input: Vec<EvalItem>
The input text. This may include template strings.
range: Option<Vec<Number>>
The range of the score. Defaults to [0, 1]
.
Implementations§
Source§impl GraderScoreModel
impl GraderScoreModel
Sourcepub fn builder() -> GraderScoreModelBuilder<((), (), (), (), ())>
pub fn builder() -> GraderScoreModelBuilder<((), (), (), (), ())>
Create a builder for building GraderScoreModel
.
On the builder, call .name(...)
, .model(...)
, .sampling_params(...)
(optional), .input(...)
, .range(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GraderScoreModel
.
Trait Implementations§
Source§impl Clone for GraderScoreModel
impl Clone for GraderScoreModel
Source§fn clone(&self) -> GraderScoreModel
fn clone(&self) -> GraderScoreModel
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 GraderScoreModel
impl Debug for GraderScoreModel
Source§impl<'de> Deserialize<'de> for GraderScoreModel
impl<'de> Deserialize<'de> for GraderScoreModel
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 GraderScoreModel
impl PartialEq for GraderScoreModel
Source§impl Serialize for GraderScoreModel
impl Serialize for GraderScoreModel
impl StructuralPartialEq for GraderScoreModel
Auto Trait Implementations§
impl Freeze for GraderScoreModel
impl RefUnwindSafe for GraderScoreModel
impl Send for GraderScoreModel
impl Sync for GraderScoreModel
impl Unpin for GraderScoreModel
impl UnwindSafe for GraderScoreModel
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