Skip to main content

GroupChatManager

Trait GroupChatManager 

Source
pub trait GroupChatManager: Send + Sync {
    // Required method
    fn select<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 GroupChatState,
    ) -> Pin<Box<dyn Future<Output = Result<GroupChatDirective, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn name(&self) -> &str { ... }
}
Expand description

The decision-making interface for a group chat. Implementations pick the next speaker or finish the conversation. Rust analogue of the manager callable / set_manager agent in Python.

Required Methods§

Source

fn select<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 GroupChatState, ) -> Pin<Box<dyn Future<Output = Result<GroupChatDirective, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Decide the next GroupChatDirective from the current state.

Provided Methods§

Source

fn name(&self) -> &str

A stable display name used to attribute manager-authored messages.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§