pub struct Session { /* private fields */ }Implementations§
Source§impl Session
impl Session
pub fn id(&self) -> &str
pub fn state(&self) -> &Chatend
pub fn objects(&self) -> &BTreeMap<PendingId, ObjectLocation>
pub fn archive_bytes(&self) -> Result<Vec<u8>>
pub fn is_sealed(&self) -> bool
pub fn seal(&mut self) -> Result<()>
pub fn repair_unfinished_tools( &mut self, recorded_at: impl Into<String>, ) -> Result<Vec<EventId>>
pub fn mark_completed(&mut self, session_object_id: String)
pub fn configure_context( &mut self, kind: SessionKind, effective_context_tokens: u64, )
pub fn create_box( &mut self, recorded_at: impl Into<String>, name: impl Into<String>, owner: BoxOwner, content: BoxContent, ) -> Result<BoxId>
pub fn update_box( &mut self, recorded_at: impl Into<String>, box_id: BoxId, content: BoxContent, ) -> Result<Option<EventId>>
pub fn dehydrate_boxes( &mut self, recorded_at: impl Into<String>, box_ids: &[BoxId], ) -> Result<Vec<EventId>>
pub fn summarize_box( &mut self, recorded_at: impl Into<String>, box_id: BoxId, text: impl Into<String>, ) -> Result<EventId>
pub fn rehydrate_box( &mut self, recorded_at: impl Into<String>, box_id: BoxId, ) -> Result<EventId>
pub fn retire_box( &mut self, recorded_at: impl Into<String>, box_id: BoxId, ) -> Result<EventId>
pub fn allocate_pending_node( &mut self, recorded_at: impl Into<String>, ) -> Result<PendingId>
pub fn stage_object( &mut self, recorded_at: impl Into<String>, media_type: impl Into<String>, file_name: Option<String>, transport: Value, bytes: &[u8], ) -> Result<PendingId>
pub fn read_object(&mut self, id: &PendingId) -> Result<Vec<u8>>
pub fn record( &mut self, recorded_at: impl Into<String>, kind: EventKind, ) -> Result<EventId>
pub fn commit_events( &mut self, recorded_at: impl Into<String>, events: Vec<Event>, ) -> Result<()>
pub fn apply_tool_slots( &mut self, recorded_at: impl Into<String>, tool_instance: impl Into<String>, slots: Vec<ToolSlotInput>, ) -> Result<Vec<EventId>>
pub fn apply_tool_slots_with_layout( &mut self, recorded_at: impl Into<String>, tool_instance: impl Into<String>, slots: Vec<ToolSlotInput>, layout_slots: &[String], ) -> Result<Vec<EventId>>
pub fn apply_box_representations( &mut self, recorded_at: impl Into<String>, desired: &BTreeMap<BoxId, BoxRepresentation>, ) -> Result<Vec<EventId>>
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