pub trait GrowerFlowStrategy: Send + Sync {
// Required methods
fn fill_justified_tree_configuration<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
) -> Pin<Box<dyn Future<Output = Result<Option<JustifiedGrowerTreeConfiguration>, ManualGrowerFlowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn fill_justified_string_skeleton<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
) -> Pin<Box<dyn Future<Output = Result<Option<JustifiedStringSkeleton>, ManualGrowerFlowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn fill_core_string_skeleton<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
stripped_skel: &'life4 StrippedStringSkeleton,
) -> Pin<Box<dyn Future<Output = Result<Option<CoreStringSkeleton>, ManualGrowerFlowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn fill_annotated_leaf_holder_expansions<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
core_skel: &'life4 CoreStringSkeleton,
) -> Pin<Box<dyn Future<Output = Result<Option<AnnotatedLeafHolderExpansions>, ManualGrowerFlowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
}Expand description
A trait representing how we fill in any missing partial-model fields. We can have multiple implementations of this:
ManualFlowStrategy(prints query text to a file + instructs user to paste the JSON)AutomatedFlowStrategy(calls the language model client automatically)
Required Methods§
Sourcefn fill_justified_tree_configuration<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
) -> Pin<Box<dyn Future<Output = Result<Option<JustifiedGrowerTreeConfiguration>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fill_justified_tree_configuration<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
) -> Pin<Box<dyn Future<Output = Result<Option<JustifiedGrowerTreeConfiguration>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle the scenario where we need a new JustifiedGrowerTreeConfiguration.
Returns Ok(Some(config)) if we successfully filled in that piece, Ok(None) if we choose to do nothing,
or an error if an unrecoverable failure happened.
Sourcefn fill_justified_string_skeleton<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
) -> Pin<Box<dyn Future<Output = Result<Option<JustifiedStringSkeleton>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fill_justified_string_skeleton<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
) -> Pin<Box<dyn Future<Output = Result<Option<JustifiedStringSkeleton>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Handle the scenario where we have a JustifiedGrowerTreeConfiguration but need a JustifiedStringSkeleton.
Sourcefn fill_core_string_skeleton<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
stripped_skel: &'life4 StrippedStringSkeleton,
) -> Pin<Box<dyn Future<Output = Result<Option<CoreStringSkeleton>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn fill_core_string_skeleton<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
stripped_skel: &'life4 StrippedStringSkeleton,
) -> Pin<Box<dyn Future<Output = Result<Option<CoreStringSkeleton>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Handle the scenario where we need a CoreStringSkeleton.
Sourcefn fill_annotated_leaf_holder_expansions<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
core_skel: &'life4 CoreStringSkeleton,
) -> Pin<Box<dyn Future<Output = Result<Option<AnnotatedLeafHolderExpansions>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn fill_annotated_leaf_holder_expansions<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
partial: &'life1 PartiallyGrownModel,
grower_inputs: &'life2 GrowerInputs,
tree_conf: &'life3 JustifiedGrowerTreeConfiguration,
core_skel: &'life4 CoreStringSkeleton,
) -> Pin<Box<dyn Future<Output = Result<Option<AnnotatedLeafHolderExpansions>, ManualGrowerFlowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Handle the scenario where we need AnnotatedLeafHolderExpansions.