objectiveai_sdk/functions/inventions/recursive/response/unary/
function_invention.rs1use crate::functions;
2use crate::functions::inventions::recursive::response;
3use serde::{Deserialize, Serialize};
4use schemars::JsonSchema;
5
6#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
7#[schemars(rename = "functions.inventions.recursive.response.unary.FunctionInvention")]
8pub struct FunctionInvention {
9 pub index: u64,
10 #[serde(flatten)]
11 pub inner: functions::inventions::response::unary::FunctionInvention,
12}
13
14impl From<response::streaming::FunctionInventionChunk> for FunctionInvention {
15 fn from(
16 response::streaming::FunctionInventionChunk { index, inner }: response::streaming::FunctionInventionChunk,
17 ) -> Self {
18 Self {
19 index,
20 inner: inner.into(),
21 }
22 }
23}