pub struct AgentInvokeRequestBuilder<N: StreamMode> { /* private fields */ }Expand description
Builder for an AgentInvokeRequest.
Implementations§
Source§impl<N: StreamMode> AgentInvokeRequestBuilder<N>
impl<N: StreamMode> AgentInvokeRequestBuilder<N>
Sourcepub fn message(self, message: AgentMessage) -> Self
pub fn message(self, message: AgentMessage) -> Self
Append one message.
Sourcepub fn messages(self, messages: impl IntoIterator<Item = AgentMessage>) -> Self
pub fn messages(self, messages: impl IntoIterator<Item = AgentMessage>) -> Self
Append multiple messages in order.
Sourcepub fn custom_variables(
self,
variables: impl Into<AgentCustomVariables>,
) -> Self
pub fn custom_variables( self, variables: impl Into<AgentCustomVariables>, ) -> Self
Replace the open variables object.
Sourcepub fn build(self) -> ZaiResult<AgentInvokeRequest<N>>
pub fn build(self) -> ZaiResult<AgentInvokeRequest<N>>
Validate the required non-empty message list and build the request.
Sourcepub fn streaming(self) -> AgentInvokeRequestBuilder<Streaming>
pub fn streaming(self) -> AgentInvokeRequestBuilder<Streaming>
Switch this request builder to streaming output.
Auto Trait Implementations§
impl<N> Freeze for AgentInvokeRequestBuilder<N>
impl<N> RefUnwindSafe for AgentInvokeRequestBuilder<N>where
N: RefUnwindSafe,
impl<N> Send for AgentInvokeRequestBuilder<N>where
N: Send,
impl<N> Sync for AgentInvokeRequestBuilder<N>where
N: Sync,
impl<N> Unpin for AgentInvokeRequestBuilder<N>where
N: Unpin,
impl<N> UnsafeUnpin for AgentInvokeRequestBuilder<N>
impl<N> UnwindSafe for AgentInvokeRequestBuilder<N>where
N: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more