pub struct CascadeRound {
pub task: String,
pub unresolved_steps: VecDeque<CascadeStep>,
pub resolved_steps: VecDeque<CascadeStep>,
pub step_separator: Option<char>,
}Fields§
§task: String§unresolved_steps: VecDeque<CascadeStep>§resolved_steps: VecDeque<CascadeStep>§step_separator: Option<char>Implementations§
Source§impl CascadeRound
impl CascadeRound
pub fn new<T: Into<String>>(task: T) -> CascadeRound
pub fn step_separator(&mut self, separator: char) -> &mut Self
pub fn add_inference_step( &mut self, step_config: &StepConfig, ) -> &mut CascadeStep
pub fn add_guidance_step<T: Into<String>>( &mut self, step_config: &StepConfig, llm_content: T, ) -> &mut CascadeStep
pub fn generation_prefix( &self, current_step: &CascadeStep, ) -> Result<Option<String>>
pub fn display_outcome(&self) -> Result<String>
pub async fn run_all_steps( &mut self, base_req: &mut CompletionRequest, ) -> Result<()>
pub async fn run_next_step( &mut self, base_req: &mut CompletionRequest, ) -> Result<()>
pub async fn cache_next_step( &mut self, base_req: &mut CompletionRequest, ) -> Result<()>
pub fn primitive_result(&self) -> Option<String>
pub fn open_round(&mut self, base_req: &mut CompletionRequest) -> Result<()>
pub fn last_step(&mut self) -> Result<&mut CascadeStep>
pub fn drop_last_step(&mut self) -> Result<()>
pub fn close_round(&mut self, base_req: &mut CompletionRequest) -> Result<()>
Trait Implementations§
Source§impl Clone for CascadeRound
impl Clone for CascadeRound
Source§fn clone(&self) -> CascadeRound
fn clone(&self) -> CascadeRound
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CascadeRound
impl !RefUnwindSafe for CascadeRound
impl Send for CascadeRound
impl !Sync for CascadeRound
impl Unpin for CascadeRound
impl UnwindSafe for CascadeRound
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.