pub trait JudgmentModel: Send + Sync {
// Required method
fn decide<'life0, 'async_trait>(
&'life0 self,
state: Value,
questions: BTreeMap<String, Question>,
) -> Pin<Box<dyn Future<Output = Result<Decisions, JudgmentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn endpoint_host(&self) -> Option<String> { ... }
fn model_id(&self) -> Option<String> { ... }
}Expand description
A calibrated-judgment model: one batched call answering runtime-defined questions about one shared state.
Required Methods§
Sourcefn decide<'life0, 'async_trait>(
&'life0 self,
state: Value,
questions: BTreeMap<String, Question>,
) -> Pin<Box<dyn Future<Output = Result<Decisions, JudgmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn decide<'life0, 'async_trait>(
&'life0 self,
state: Value,
questions: BTreeMap<String, Question>,
) -> Pin<Box<dyn Future<Output = Result<Decisions, JudgmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ask every question in questions about state in a single call.
Provided Methods§
Sourcefn endpoint_host(&self) -> Option<String>
fn endpoint_host(&self) -> Option<String>
Host of the endpoint this model calls, for the review report. None
when unknown (fakes) or unparseable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".