pub struct InteractiveWorkflowBuilder { /* private fields */ }Expand description
Builder for creating interactive workflows
Implementations§
Source§impl InteractiveWorkflowBuilder
impl InteractiveWorkflowBuilder
Sourcepub fn add_node<F, Fut>(self, id: impl Into<String>, func: F) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
pub fn add_node<F, Fut>(self, id: impl Into<String>, func: F) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
Add a node
Sourcepub fn add_node_with_approval<F, Fut>(
self,
id: impl Into<String>,
func: F,
gate: ApprovalGate,
) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
pub fn add_node_with_approval<F, Fut>(
self,
id: impl Into<String>,
func: F,
gate: ApprovalGate,
) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
Add a node with approval gate
Sourcepub fn add_node_with_input<F, Fut>(
self,
id: impl Into<String>,
func: F,
request: HumanInputRequest,
) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
pub fn add_node_with_input<F, Fut>(
self,
id: impl Into<String>,
func: F,
request: HumanInputRequest,
) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
Add a node with input request
Sourcepub fn add_breakpoint_node<F, Fut>(self, id: impl Into<String>, func: F) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
pub fn add_breakpoint_node<F, Fut>(self, id: impl Into<String>, func: F) -> Selfwhere
F: Fn(GraphState) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<GraphState, CrewError>> + Send + 'static,
Add a breakpoint node
Sourcepub fn add_conditional_edge<F>(self, from: impl Into<String>, router: F) -> Self
pub fn add_conditional_edge<F>(self, from: impl Into<String>, router: F) -> Self
Add conditional edge
Sourcepub fn build(self) -> Result<InteractiveGraph, CrewError>
pub fn build(self) -> Result<InteractiveGraph, CrewError>
Build the interactive graph
Auto Trait Implementations§
impl Freeze for InteractiveWorkflowBuilder
impl !RefUnwindSafe for InteractiveWorkflowBuilder
impl Send for InteractiveWorkflowBuilder
impl Sync for InteractiveWorkflowBuilder
impl Unpin for InteractiveWorkflowBuilder
impl UnsafeUnpin for InteractiveWorkflowBuilder
impl !UnwindSafe for InteractiveWorkflowBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more