langfuse-client-base 0.14.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
 *
 * The version of the OpenAPI document:
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct UnstableCreateEvaluatorRequestOneOf {
    /// Evaluator name within the authenticated project.
    #[serde(rename = "name")]
    pub name: String,
    /// Prompt template used by the evaluator.
    #[serde(rename = "prompt")]
    pub prompt: String,
    #[serde(rename = "outputDefinition")]
    pub output_definition: Box<models::UnstableEvaluatorOutputDefinition>,
    #[serde(rename = "modelConfig", skip_serializing_if = "Option::is_none")]
    pub model_config: Option<Box<models::UnstableEvaluatorModelConfig>>,
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl UnstableCreateEvaluatorRequestOneOf {
    pub fn new(
        name: String,
        prompt: String,
        output_definition: models::UnstableEvaluatorOutputDefinition,
        r#type: Type,
    ) -> UnstableCreateEvaluatorRequestOneOf {
        UnstableCreateEvaluatorRequestOneOf {
            name,
            prompt,
            output_definition: Box::new(output_definition),
            model_config: None,
            r#type,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "llm_as_judge")]
    LlmAsJudge,
}

impl Default for Type {
    fn default() -> Type {
        Self::LlmAsJudge
    }
}