Skip to main content

objectiveai_sdk/functions/executions/response/streaming/task_log_reference/
mod.rs

1//! Untagged-enum `LogReference` for a task entry within a parent
2//! function-execution log file. Dispatches between
3//! [`super::function_execution_task_log_reference::LogReference`] and
4//! [`super::vector_completion_task_log_reference::LogReference`]
5//! depending on which task variant the parent's `TaskChunk`
6//! produced.
7//!
8//! Serializes as the inner variant directly (no discriminator)
9//! because the two task-reference shapes are already structurally
10//! distinguishable on disk via their field sets.
11
12use schemars::JsonSchema;
13use serde::{Deserialize, Serialize};
14
15#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
16#[serde(untagged)]
17#[schemars(
18    rename = "functions.executions.response.streaming.task_log_reference.LogReference"
19)]
20pub enum LogReference {
21    #[schemars(title = "FunctionExecution")]
22    FunctionExecution(
23        super::function_execution_task_log_reference::LogReference,
24    ),
25    #[schemars(title = "VectorCompletion")]
26    VectorCompletion(super::vector_completion_task_log_reference::LogReference),
27}