objectiveai-sdk 2.0.6

ObjectiveAI SDK, definitions, and utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::functions;
use serde::{Deserialize, Serialize};
use schemars::JsonSchema;

/// Wrapper for function execution output, distinguishing between
/// a null output value and a missing output.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, arbitrary::Arbitrary)]
#[schemars(rename = "functions.executions.response.Output")]
pub struct Output {
    pub output: functions::expression::TaskOutputOwned,
}

impl Output {
    pub fn unwrap(self) -> functions::expression::TaskOutputOwned {
        self.output
    }
}