pub trait Brain: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn caps(&self) -> ModelCaps;
fn complete<'life0, 'async_trait>(
&'life0 self,
req: BrainRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = BrainEvent> + Send>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Uniform interface over every model vendor. Normalizes messages, streaming, and tool-calling so the rest of the system is vendor-agnostic.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".