pub struct ChildSession {
pub id: String,
pub path: PathBuf,
pub parent_session_id: String,
pub cwd: PathBuf,
pub boot_system_prompt: String,
pub llm: LlmSettings,
pub task: String,
pub messages: Vec<ChatMessage>,
pub status: ChildSessionStatus,
/* private fields */
}Fields§
§id: String§path: PathBuf§parent_session_id: String§cwd: PathBuf§boot_system_prompt: String§llm: LlmSettings§task: String§messages: Vec<ChatMessage>§status: ChildSessionStatusImplementations§
Source§impl ChildSession
impl ChildSession
pub fn create( home: &Path, parent_session_id: &str, cwd: &Path, boot_system_prompt: String, llm: LlmSettings, task: String, secret: Option<&str>, ) -> Result<Self, SessionError>
pub fn append_message( &mut self, message: ChatMessage, ) -> Result<(), SessionError>
pub fn append_status( &mut self, status: ChildSessionStatus, reason: Option<String>, result: Option<Value>, ) -> Result<(), SessionError>
pub fn provider_messages(&self) -> Vec<ChatMessage>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChildSession
impl RefUnwindSafe for ChildSession
impl Send for ChildSession
impl Sync for ChildSession
impl Unpin for ChildSession
impl UnsafeUnpin for ChildSession
impl UnwindSafe for ChildSession
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more