pub struct Brain<B: NeuralBackend> { /* private fields */ }Expand description
The deterministic cognitive engine.
Wraps a NeuralBackend and provides the full pipeline:
render → generate → strict-parse → SemanticUnit.
Implementations§
Source§impl<B: NeuralBackend> Brain<B>
impl<B: NeuralBackend> Brain<B>
Sourcepub async fn reason(
&self,
ctx: &CognitiveContext,
cfg: &GenerationConfig,
) -> Result<Decision, BrainError>
pub async fn reason( &self, ctx: &CognitiveContext, cfg: &GenerationConfig, ) -> Result<Decision, BrainError>
Render → Generate → Strict-parse → SemanticUnit.
§Errors
Returns an error if rendering fails, the provider fails,
or the output cannot be parsed into a valid SemanticUnit.
Auto Trait Implementations§
impl<B> Freeze for Brain<B>where
B: Freeze,
impl<B> RefUnwindSafe for Brain<B>where
B: RefUnwindSafe,
impl<B> Send for Brain<B>
impl<B> Sync for Brain<B>
impl<B> Unpin for Brain<B>where
B: Unpin,
impl<B> UnwindSafe for Brain<B>where
B: UnwindSafe,
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