pub struct AgentSession {
pub session_id: SessionId,
pub history: Vec<ChatCompletionRequestMessage>,
pub working_dir: PathBuf,
}Expand description
A single conversation session with its own message history.
Fields§
§session_id: SessionId§history: Vec<ChatCompletionRequestMessage>§working_dir: PathBufImplementations§
Source§impl AgentSession
impl AgentSession
Sourcepub fn with_history(
session_id: SessionId,
working_dir: PathBuf,
system_prompt: String,
history: Vec<ChatCompletionRequestMessage>,
) -> Self
pub fn with_history( session_id: SessionId, working_dir: PathBuf, system_prompt: String, history: Vec<ChatCompletionRequestMessage>, ) -> Self
Create session with pre-loaded history
Auto Trait Implementations§
impl Freeze for AgentSession
impl RefUnwindSafe for AgentSession
impl Send for AgentSession
impl Sync for AgentSession
impl Unpin for AgentSession
impl UnsafeUnpin for AgentSession
impl UnwindSafe for AgentSession
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