langfuse-client-base 0.13.1

Auto-generated Langfuse API client from OpenAPI specification
Documentation
/*
 * langfuse
 *
 * ## 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};

/// UnstableEvaluationRuleMappingSource : Source field used to populate a prompt variable.  Use these values when mapping evaluator prompt variables to live data.  Target-specific rules: - `target=observation` supports `input`, `output`, and `metadata` - `target=experiment` supports `input`, `output`, `metadata`, and `expected_output`  Source semantics: - `input`: the observation or experiment input payload - `output`: the observation or experiment output payload - `metadata`: the metadata object for the target. Combine with `jsonPath` when you need one nested field instead of the whole object. - `expected_output`: the experiment item's expected output. Only valid for `target=experiment`.
/// Source field used to populate a prompt variable.  Use these values when mapping evaluator prompt variables to live data.  Target-specific rules: - `target=observation` supports `input`, `output`, and `metadata` - `target=experiment` supports `input`, `output`, `metadata`, and `expected_output`  Source semantics: - `input`: the observation or experiment input payload - `output`: the observation or experiment output payload - `metadata`: the metadata object for the target. Combine with `jsonPath` when you need one nested field instead of the whole object. - `expected_output`: the experiment item's expected output. Only valid for `target=experiment`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum UnstableEvaluationRuleMappingSource {
    #[serde(rename = "input")]
    Input,
    #[serde(rename = "output")]
    Output,
    #[serde(rename = "metadata")]
    Metadata,
    #[serde(rename = "expected_output")]
    ExpectedOutput,
}

impl std::fmt::Display for UnstableEvaluationRuleMappingSource {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Input => write!(f, "input"),
            Self::Output => write!(f, "output"),
            Self::Metadata => write!(f, "metadata"),
            Self::ExpectedOutput => write!(f, "expected_output"),
        }
    }
}

impl Default for UnstableEvaluationRuleMappingSource {
    fn default() -> UnstableEvaluationRuleMappingSource {
        Self::Input
    }
}