Skip to main content

objectiveai_sdk/functions/inventions/response/unary/
object.rs

1use crate::functions::inventions::response;
2use serde::{Deserialize, Serialize};
3use schemars::JsonSchema;
4
5#[derive(Debug, Clone, Copy, Serialize, Deserialize, JsonSchema)]
6#[schemars(rename = "functions.inventions.response.unary.Object")]
7pub enum Object {
8    #[serde(rename = "alpha.scalar.function.invention")]
9    AlphaScalarFunctionInvention,
10    #[serde(rename = "alpha.vector.function.invention")]
11    AlphaVectorFunctionInvention,
12}
13
14impl From<response::streaming::Object> for Object {
15    fn from(value: response::streaming::Object) -> Self {
16        match value {
17            response::streaming::Object::AlphaScalarFunctionInventionChunk => {
18                Object::AlphaScalarFunctionInvention
19            }
20            response::streaming::Object::AlphaVectorFunctionInventionChunk => {
21                Object::AlphaVectorFunctionInvention
22            }
23        }
24    }
25}