use crate::{agent, functions, laboratories::executions::response};
use serde::{Deserialize, Serialize};
use schemars::JsonSchema;
#[derive(Debug, Clone, Serialize, Deserialize, Default, JsonSchema)]
#[schemars(rename = "laboratories.executions.response.unary.Evaluation")]
pub struct Evaluation {
pub index: u64,
pub agent_index: u64,
#[serde(flatten)]
pub inner: agent::completions::response::unary::AgentCompletion,
pub output: Option<functions::expression::InputValue>,
}
impl From<response::streaming::EvaluationChunk> for Evaluation {
fn from(
response::streaming::EvaluationChunk {
index,
agent_index,
inner,
output,
}: response::streaming::EvaluationChunk,
) -> Self {
Self {
index,
agent_index,
inner: inner.into(),
output,
}
}
}