scouter_evaluate/tasks/traits.rs
1use crate::error::EvaluationError;
2
3use scouter_types::genai::AssertionResult;
4use serde_json::Value;
5use std::fmt::Debug;
6
7pub trait EvaluationTask: Debug + Send + Sync {
8 /// Execute the task and return results
9 /// # Arguments
10 /// * `context` - The evaluation context containing necessary data
11 /// # Returns
12 /// An EvaluationTaskResult containing the outcome of the task
13 fn execute(&self, context: &Value) -> Result<AssertionResult, EvaluationError>;
14}