pub struct Pipeline { /* private fields */ }Expand description
Builder over a sequence of Callables.
Implementations§
Source§impl Pipeline
impl Pipeline
pub fn from(c: CallableHandle) -> Self
Sourcepub fn then(self, c: CallableHandle) -> Self
pub fn then(self, c: CallableHandle) -> Self
prompt | model — chain another stage.
Sourcepub fn passthrough(self) -> Self
pub fn passthrough(self) -> Self
Pass input through unchanged. Useful as a starting node.
Sourcepub fn assign(self, key: impl Into<String>, c: CallableHandle) -> Self
pub fn assign(self, key: impl Into<String>, c: CallableHandle) -> Self
RunnablePassthrough.assign(key=fn) — run c on the current
input and add the result under key, leaving original input
fields intact.
Sourcepub fn fan_out_with(self, branches: Vec<(String, CallableHandle)>) -> Self
pub fn fan_out_with(self, branches: Vec<(String, CallableHandle)>) -> Self
RunnableParallel({a: ca, b: cb}) as an inline stage. Each
branch runs concurrently on the current input; output is a
JSON object keyed by branch name.
pub fn build(self) -> CallableHandle
Auto Trait Implementations§
impl Freeze for Pipeline
impl !RefUnwindSafe for Pipeline
impl Send for Pipeline
impl Sync for Pipeline
impl Unpin for Pipeline
impl UnsafeUnpin for Pipeline
impl !UnwindSafe for Pipeline
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