pub trait BehavioralModel {
// Required method
fn respond<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
system: &'life1 str,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
A model the behavioral battery can drive. One respond call is one victim
turn: a fixed benign system prompt plus the user turn that embeds the framed
untrusted document. The return is the model’s full assistant text.
Implementors: a mock for tests, and a live provider client for the on-demand baseline. The trait intentionally hides streaming, tools, and history — the probe is a single-shot obedience test, so anything richer would only add confounds.
Required Methods§
Sourcefn respond<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
system: &'life1 str,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn respond<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
system: &'life1 str,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return the assistant’s reply to user under system, or an error
string if the call itself failed (which is scored as a non-hit, never a
silent success — a broken call must not read as “defended”).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".