pub struct DebateArena {
pub config: DebateConfig,
/* private fields */
}Expand description
The debate arena where agents debate
Fields§
§config: DebateConfigImplementations§
Source§impl DebateArena
impl DebateArena
pub fn new(config: DebateConfig) -> Self
pub fn set_proposition(&mut self, proposition: impl Into<String>)
Sourcepub fn add_argument(&mut self, argument: Argument)
pub fn add_argument(&mut self, argument: Argument)
Add an argument from an agent
Sourcepub fn get_arguments_by_role(&self, role: AgentRole) -> Vec<&Argument>
pub fn get_arguments_by_role(&self, role: AgentRole) -> Vec<&Argument>
Get arguments from a specific role
Sourcepub fn get_arguments_by_round(&self, round: usize) -> Vec<&Argument>
pub fn get_arguments_by_round(&self, round: usize) -> Vec<&Argument>
Get arguments from a specific round
Sourcepub fn transcript(&self) -> String
pub fn transcript(&self) -> String
Get the debate transcript
Sourcepub fn compute_stats(&self) -> DebateStats
pub fn compute_stats(&self) -> DebateStats
Compute debate statistics
Sourcepub fn synthesize_verdict(&self) -> DebateVerdict
pub fn synthesize_verdict(&self) -> DebateVerdict
Synthesize a verdict from the debate
Sourcepub fn build_result(&self) -> DebateResult
pub fn build_result(&self) -> DebateResult
Build the full debate result
Sourcepub fn next_round(&mut self)
pub fn next_round(&mut self)
Move to next round
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DebateArena
impl RefUnwindSafe for DebateArena
impl Send for DebateArena
impl Sync for DebateArena
impl Unpin for DebateArena
impl UnwindSafe for DebateArena
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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