pub enum GroupChatDirective {
Speak {
participant: String,
instruction: Option<String>,
},
Finish {
final_message: Option<Message>,
},
}Expand description
An instruction emitted by a GroupChatManager: either route to a
participant, or finish the conversation. Rust analogue of
GroupChatDirective.
Variants§
Speak
Route the conversation to participant, optionally with an instruction.
Fields
Finish
Finish the conversation, optionally with a final message.
Implementations§
Source§impl GroupChatDirective
impl GroupChatDirective
Sourcepub fn speak(participant: impl Into<String>) -> GroupChatDirective
pub fn speak(participant: impl Into<String>) -> GroupChatDirective
Route to participant with no instruction.
Sourcepub fn speak_with(
participant: impl Into<String>,
instruction: impl Into<String>,
) -> GroupChatDirective
pub fn speak_with( participant: impl Into<String>, instruction: impl Into<String>, ) -> GroupChatDirective
Route to participant with an instruction.
Sourcepub fn finish() -> GroupChatDirective
pub fn finish() -> GroupChatDirective
Finish with a default completion message.
Sourcepub fn finish_with(message: Message) -> GroupChatDirective
pub fn finish_with(message: Message) -> GroupChatDirective
Finish with an explicit final message.
Sourcepub fn finish_text(text: impl Into<String>) -> GroupChatDirective
pub fn finish_text(text: impl Into<String>) -> GroupChatDirective
Finish with a plain-text final answer.
Trait Implementations§
Source§impl Clone for GroupChatDirective
impl Clone for GroupChatDirective
Source§fn clone(&self) -> GroupChatDirective
fn clone(&self) -> GroupChatDirective
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 moreAuto Trait Implementations§
impl Freeze for GroupChatDirective
impl RefUnwindSafe for GroupChatDirective
impl Send for GroupChatDirective
impl Sync for GroupChatDirective
impl Unpin for GroupChatDirective
impl UnsafeUnpin for GroupChatDirective
impl UnwindSafe for GroupChatDirective
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