langfuse-client-base 0.16.0

Auto-generated Langfuse API client from OpenAPI specification
Documentation
/*
 * 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 - Self-hosted deployments: interactive API reference at `/api/docs` and OpenAPI spec at `/api/openapi.yaml`
 *
 * 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}` returns the latest version. - `id` identifies the evaluator family and remains stable when a new version is created. - 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}` returns the latest version. - `id` identifies the evaluator family and remains stable when a new version is created. - 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 {
    UnstableLlmAsJudgeEvaluator(Box<models::UnstableLlmAsJudgeEvaluator>),
    UnstableCodeEvaluator(Box<models::UnstableCodeEvaluator>),
}

impl Default for UnstableEvaluator {
    fn default() -> Self {
        Self::UnstableLlmAsJudgeEvaluator(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
    }
}