pub struct HumanInTheLoopSystem {
pub id: String,
pub pending_reviews: Vec<PendingReview>,
pub completed_reviews: Vec<CompletedReview>,
pub reviewers: Vec<ExpertReviewer>,
pub config: HitlConfiguration,
}Expand description
Human-in-the-loop refinement system.
Fields§
§id: StringSystem ID
pending_reviews: Vec<PendingReview>Pending reviews
completed_reviews: Vec<CompletedReview>Completed reviews
reviewers: Vec<ExpertReviewer>Expert reviewers
config: HitlConfigurationSystem configuration
Implementations§
Source§impl HumanInTheLoopSystem
impl HumanInTheLoopSystem
Sourcepub fn new(config: HitlConfiguration) -> Self
pub fn new(config: HitlConfiguration) -> Self
Creates a new human-in-the-loop system.
Sourcepub fn submit_for_review(&mut self, review: PendingReview)
pub fn submit_for_review(&mut self, review: PendingReview)
Submits a proposal for human review.
Sourcepub fn complete_review(&mut self, review: CompletedReview)
pub fn complete_review(&mut self, review: CompletedReview)
Completes a review.
Sourcepub fn add_reviewer(&mut self, reviewer: ExpertReviewer)
pub fn add_reviewer(&mut self, reviewer: ExpertReviewer)
Adds a reviewer to the system.
Sourcepub fn high_priority_reviews(&self) -> Vec<&PendingReview>
pub fn high_priority_reviews(&self) -> Vec<&PendingReview>
Gets high-priority pending reviews (priority >= 4).
Sourcepub fn approval_rate(&self) -> f64
pub fn approval_rate(&self) -> f64
Gets the approval rate.
Trait Implementations§
Source§impl Clone for HumanInTheLoopSystem
impl Clone for HumanInTheLoopSystem
Source§fn clone(&self) -> HumanInTheLoopSystem
fn clone(&self) -> HumanInTheLoopSystem
Returns a duplicate of the value. Read more
1.0.0 · 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 HumanInTheLoopSystem
impl Debug for HumanInTheLoopSystem
Source§impl<'de> Deserialize<'de> for HumanInTheLoopSystem
impl<'de> Deserialize<'de> for HumanInTheLoopSystem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HumanInTheLoopSystem
impl RefUnwindSafe for HumanInTheLoopSystem
impl Send for HumanInTheLoopSystem
impl Sync for HumanInTheLoopSystem
impl Unpin for HumanInTheLoopSystem
impl UnwindSafe for HumanInTheLoopSystem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more