1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* OpenAI API
*
* The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
*
* OpenAPI spec pub version: 2.3.0
*
* Generated pub by: https://github.com/swagger-api/swagger-codegen.git
*/
/// pub EvalScoreModelGrader : A ScoreModelGrader object that uses a model to assign a score to the input.
#[allow(unused_imports)]
use serde_json::Value;
#[derive(Debug, Serialize, Deserialize)]
pub struct EvalScoreModelGrader {
/// The input text. This may include template strings.
#[serde(rename = "input")]
pub input: Vec<crate::models::EvalItem>,
/// The model to use for the evaluation.
#[serde(rename = "model")]
pub model: String,
/// The name of the grader.
#[serde(rename = "name")]
pub name: String,
/// The threshold for the score.
#[serde(rename = "pass_threshold")]
pub pass_threshold: Option<f32>,
/// The range of the score. Defaults to `[0, 1]`.
#[serde(rename = "range")]
#[serde(default = "default_range")]
pub range: Option<Vec<f32>>,
/// The sampling parameters for the model.
#[serde(rename = "sampling_params")]
pub sampling_params: Option<Value>,
/// The object type, which is always `score_model`.
#[serde(rename = "type")]
#[serde(default = "default_type")]
pub _type: String,
}
fn default_type() -> String {
"score_model".into()
}
fn default_range() -> Option<Vec<f32>> {
Some(vec![0f32, 1f32])
}