pub trait DecisionModel: Send + Sync {
// Required methods
fn model_id(&self) -> &str;
fn decide<'life0, 'async_trait>(
&'life0 self,
request: DecisionRequest,
) -> Pin<Box<dyn Future<Output = Result<DecisionResponse, LlmError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A model that answers typed questions about a state.
Required Methods§
Sourcefn decide<'life0, 'async_trait>(
&'life0 self,
request: DecisionRequest,
) -> Pin<Box<dyn Future<Output = Result<DecisionResponse, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn decide<'life0, 'async_trait>(
&'life0 self,
request: DecisionRequest,
) -> Pin<Box<dyn Future<Output = Result<DecisionResponse, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Answer request’s questions.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".