objectiveai_sdk/laboratories/executions/response/unary/
builder.rs1use crate::{agent, laboratories::executions::response};
2use serde::{Deserialize, Serialize};
3use schemars::JsonSchema;
4
5#[derive(Debug, Clone, Serialize, Deserialize, Default, JsonSchema)]
7#[schemars(rename = "laboratories.executions.response.unary.Builder")]
8pub struct Builder {
9 pub index: u64,
11 pub agent_index: u64,
13 #[serde(flatten)]
14 pub inner: agent::completions::response::unary::AgentCompletion,
15}
16
17impl From<response::streaming::BuilderChunk> for Builder {
18 fn from(
19 response::streaming::BuilderChunk {
20 index,
21 agent_index,
22 inner,
23 }: response::streaming::BuilderChunk,
24 ) -> Self {
25 Self {
26 index,
27 agent_index,
28 inner: inner.into(),
29 }
30 }
31}