/*
* 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};
/// UnstableCreateEvaluationRuleRequest : Request body for creating an evaluation rule. Checklist for agents and SDK clients: - reference an existing evaluator family by `evaluator.name` and `evaluator.scope` - choose `target=observation` or `target=experiment` - if `target=experiment` and you want a dataset filter, call `GET /api/public/v2/datasets` first and use dataset `id` values in `filter[].value` - for `llm_as_judge`, fetch or inspect the evaluator first and provide a complete variable mapping for every evaluator variable - for `code`, do not send variables or mappings; Langfuse stores the fixed code runtime mapping automatically - optionally narrow execution with `filter` - set `enabled=true` only when you want live execution immediately
/// Request body for creating an evaluation rule. Checklist for agents and SDK clients: - reference an existing evaluator family by `evaluator.name` and `evaluator.scope` - choose `target=observation` or `target=experiment` - if `target=experiment` and you want a dataset filter, call `GET /api/public/v2/datasets` first and use dataset `id` values in `filter[].value` - for `llm_as_judge`, fetch or inspect the evaluator first and provide a complete variable mapping for every evaluator variable - for `code`, do not send variables or mappings; Langfuse stores the fixed code runtime mapping automatically - optionally narrow execution with `filter` - set `enabled=true` only when you want live execution immediately
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UnstableCreateEvaluationRuleRequest {
UnstableCreateLlmAsJudgeEvaluationRuleRequest(
Box<models::UnstableCreateLlmAsJudgeEvaluationRuleRequest>,
),
UnstableCreateCodeEvaluationRuleRequest(Box<models::UnstableCreateCodeEvaluationRuleRequest>),
}
impl Default for UnstableCreateEvaluationRuleRequest {
fn default() -> Self {
Self::UnstableCreateLlmAsJudgeEvaluationRuleRequest(Default::default())
}
}