/*
* server
*
* ## Authentication Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings: - username: Langfuse Public Key - password: Langfuse Secret Key ## Exports - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml
*
* The version of the OpenAPI document:
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// UnstableEvaluator : One evaluator that can be used for scoring. An evaluator describes **how** to score data. It does not define **which** live objects are evaluated. That is the job of `evaluation-rules`. For agent clients, the most important fields are: - `type`: determines which evaluator fields are present - `variables`: for LLM evaluators, use these exact names when building the evaluation-rule `mapping` array. LLM evaluators require every variable to be mapped. Code evaluators always expose the fixed runtime payload fields and Langfuse maps them automatically. Versioning behavior: - `GET /evaluators` returns the latest version of each available evaluator. - `GET /evaluators/{id}` can return an older version. - Evaluation rules always run against the latest version for the selected evaluator name within the same source (`project` or `managed`).
/// One evaluator that can be used for scoring. An evaluator describes **how** to score data. It does not define **which** live objects are evaluated. That is the job of `evaluation-rules`. For agent clients, the most important fields are: - `type`: determines which evaluator fields are present - `variables`: for LLM evaluators, use these exact names when building the evaluation-rule `mapping` array. LLM evaluators require every variable to be mapped. Code evaluators always expose the fixed runtime payload fields and Langfuse maps them automatically. Versioning behavior: - `GET /evaluators` returns the latest version of each available evaluator. - `GET /evaluators/{id}` can return an older version. - Evaluation rules always run against the latest version for the selected evaluator name within the same source (`project` or `managed`).
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UnstableEvaluator {
UnstableEvaluatorOneOf(Box<models::UnstableEvaluatorOneOf>),
UnstableEvaluatorOneOf1(Box<models::UnstableEvaluatorOneOf1>),
}
impl Default for UnstableEvaluator {
fn default() -> Self {
Self::UnstableEvaluatorOneOf(Default::default())
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "llm_as_judge")]
LlmAsJudge,
#[serde(rename = "code")]
Code,
}
impl Default for Type {
fn default() -> Type {
Self::LlmAsJudge
}
}