pub struct CompositionAgent<'a> { /* private fields */ }Expand description
The Composition Agent translates problem descriptions into valid composition graphs. When no existing stage satisfies the required signature, it can synthesize a new one.
Implementations§
Source§impl<'a> CompositionAgent<'a>
impl<'a> CompositionAgent<'a>
pub fn new( index: &'a mut SemanticIndex, llm: &'a dyn LlmProvider, llm_config: LlmConfig, max_retries: u32, ) -> Self
Sourcepub fn compose(
&mut self,
problem: &str,
store: &mut dyn StageStore,
) -> Result<ComposeResult, AgentError>
pub fn compose( &mut self, problem: &str, store: &mut dyn StageStore, ) -> Result<ComposeResult, AgentError>
Translate a problem description into a valid composition graph.
If the LLM determines that a new stage is needed it triggers synthesis
(at most once per call): the stage is registered in store, indexed,
then composition is retried with the new stage available.
Auto Trait Implementations§
impl<'a> Freeze for CompositionAgent<'a>
impl<'a> !RefUnwindSafe for CompositionAgent<'a>
impl<'a> Send for CompositionAgent<'a>
impl<'a> Sync for CompositionAgent<'a>
impl<'a> Unpin for CompositionAgent<'a>
impl<'a> UnsafeUnpin for CompositionAgent<'a>
impl<'a> !UnwindSafe for CompositionAgent<'a>
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