Skip to main content

AgentMessage

Trait AgentMessage 

Source
pub trait AgentMessage: Clone {
    type Role: MessageRole;

    // Required methods
    fn new(role: Self::Role, content: String) -> Self;
    fn role(&self) -> &Self::Role;
    fn content(&self) -> &str;
}
Expand description

A message in the agent conversation.

Required Associated Types§

Required Methods§

Source

fn new(role: Self::Role, content: String) -> Self

Source

fn role(&self) -> &Self::Role

Source

fn content(&self) -> &str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§