pub struct Session {Show 14 fields
pub session_type: String,
pub channel: Value,
pub free_time: Value,
pub orchestration: Value,
pub provenance_id: Option<String>,
pub rust_lib_session_id: String,
pub root_node_ids: Vec<String>,
pub reference_root_node_ids: Vec<String>,
pub started_at: String,
pub transcript: Vec<Value>,
pub pending_turn: bool,
pub pending_external_event_id: Option<String>,
pub completed: bool,
pub rounds_used: u64,
/* private fields */
}Fields§
§session_type: String§channel: Value§free_time: Value§orchestration: Value§provenance_id: Option<String>§rust_lib_session_id: String§root_node_ids: Vec<String>§reference_root_node_ids: Vec<String>§started_at: String§transcript: Vec<Value>§pending_turn: bool§pending_external_event_id: Option<String>§completed: bool§rounds_used: u64Implementations§
Source§impl Session
impl Session
pub async fn new( api: Service, system_prompt: String, runtime: RuntimeModel, options: SessionOptions, restored: Option<&Value>, ) -> Result<Self>
pub fn append_final_user_message( &mut self, text: &str, metadata: &Value, ) -> bool
pub fn stage_source_message( &mut self, kennedy: bool, text: &str, metadata: Value, ) -> Result<()>
pub fn answer_for_external_event(&self, id: &str) -> Option<&Value>
pub fn responses_for_external_event(&self, id: &str) -> Vec<&Value>
pub fn resolve_object(&mut self, object_id: &str) -> Result<ResolvedObject>
pub fn requires_history_ingress(&self) -> bool
pub fn stage_free_time_opening(&mut self) -> bool
pub fn stage_wakeup_opening(&mut self) -> Result<bool>
pub fn begin_user_turn(&mut self, text: &str, metadata: &Value) -> bool
pub fn reset_exhausted_turn_rounds_for_retry(&mut self)
pub fn interrupt_current_turn(&mut self) -> Result<()>
pub async fn run_pending_turn<C, F>( &mut self, operation_id: Uuid, checkpoint: C, ) -> Result<Option<String>>
pub fn refresh_telegram_group_context( &mut self, group_context: &Value, current_message_id: Option<&str>, ) -> Result<()>
pub fn finalize_free_time(&mut self, reason: &str) -> Result<()>
pub fn commit_current_write_session(&mut self) -> Result<()>
pub fn snapshot(&self) -> Result<Value>
pub async fn release_managed_sources(&self)
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl !UnwindSafe for Session
impl Freeze for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Erasable for T
impl<T> Erasable for T
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