pub struct Session {
pub id: SessionId,
pub model: String,
pub max_turns: usize,
pub system_message: Option<String>,
pub messages: Vec<AgentMessage>,
pub metadata: HashMap<String, String>,
}Expand description
One session: its id, configuration, message log, and metadata.
Fields§
§id: SessionIdThe id.
model: StringThe model id used for this session.
max_turns: usizeMax turns configured for this session.
system_message: Option<String>The system message (instructions) for this session.
messages: Vec<AgentMessage>Conversation so far.
metadata: HashMap<String, String>Arbitrary metadata.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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