pub struct TurnRuleReviewer { /* private fields */ }Expand description
Named deterministic rule adapter for TurnReviewer.
Implementations§
Source§impl TurnRuleReviewer
impl TurnRuleReviewer
Sourcepub fn new<F>(
name: impl Into<String>,
version: impl Into<String>,
rule: F,
) -> Result<Self, TurnReviewError>where
F: Fn(&TurnReviewRequest) -> Result<TurnReviewVerdict, TurnReviewError> + Send + Sync + 'static,
pub fn new<F>(
name: impl Into<String>,
version: impl Into<String>,
rule: F,
) -> Result<Self, TurnReviewError>where
F: Fn(&TurnReviewRequest) -> Result<TurnReviewVerdict, TurnReviewError> + Send + Sync + 'static,
Creates a validated deterministic internal-turn reviewer.
§Errors
Returns TurnReviewError::InvalidConfiguration for invalid stable
identity fields.
Trait Implementations§
Source§impl Clone for TurnRuleReviewer
impl Clone for TurnRuleReviewer
Source§fn clone(&self) -> TurnRuleReviewer
fn clone(&self) -> TurnRuleReviewer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TurnRuleReviewer
impl Debug for TurnRuleReviewer
Source§impl TurnReviewer for TurnRuleReviewer
impl TurnReviewer for TurnRuleReviewer
Source§fn turn_descriptor(&self) -> &TurnReviewerDescriptor
fn turn_descriptor(&self) -> &TurnReviewerDescriptor
Returns the stable identity persisted into Agent checkpoints.
Source§fn review_turn<'a>(
&'a self,
request: TurnReviewRequest,
_run: &'a RunContext,
) -> TurnReviewFuture<'a>
fn review_turn<'a>( &'a self, request: TurnReviewRequest, _run: &'a RunContext, ) -> TurnReviewFuture<'a>
Reviews one model response inside an explicitly attenuated child run.
Auto Trait Implementations§
impl !RefUnwindSafe for TurnRuleReviewer
impl !UnwindSafe for TurnRuleReviewer
impl Freeze for TurnRuleReviewer
impl Send for TurnRuleReviewer
impl Sync for TurnRuleReviewer
impl Unpin for TurnRuleReviewer
impl UnsafeUnpin for TurnRuleReviewer
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