objectiveai-api 2.0.5

ObjectiveAI API Server
1
2
3
4
5
6
7
8
9
10
11
12
13
use serde::{Deserialize, Serialize};

/// Untagged union over the leaf input types. Each leaf carries its own
/// `r#type` discriminator field, so serde dispatches by trying variants in
/// declaration order and matching whichever leaf's literal type accepts.
/// Mirrors Python's `UserInput = Union[TextInput, LocalImageInput]`
/// (`types.py:79`).
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[serde(untagged)]
pub enum UserInput {
    Text(super::TextInput),
    LocalImage(super::LocalImageInput),
}