langfuse_rs/models/
score_source.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum ScoreSource {
16 #[serde(rename = "ANNOTATION")]
17 Annotation,
18 #[serde(rename = "API")]
19 Api,
20 #[serde(rename = "EVAL")]
21 Eval,
22}
23
24impl std::fmt::Display for ScoreSource {
25 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
26 match self {
27 Self::Annotation => write!(f, "ANNOTATION"),
28 Self::Api => write!(f, "API"),
29 Self::Eval => write!(f, "EVAL"),
30 }
31 }
32}
33
34impl Default for ScoreSource {
35 fn default() -> ScoreSource {
36 Self::Annotation
37 }
38}