pub struct StateStore { /* private fields */ }Implementations§
Source§impl StateStore
impl StateStore
pub fn open(path: Option<PathBuf>) -> Result<Self>
pub fn db_path(&self) -> &Path
pub fn upsert_thread(&self, thread: &ThreadMetadata) -> Result<()>
pub fn get_thread(&self, id: &str) -> Result<Option<ThreadMetadata>>
pub fn list_threads( &self, filters: ThreadListFilters, ) -> Result<Vec<ThreadMetadata>>
pub fn mark_archived(&self, id: &str) -> Result<()>
pub fn mark_unarchived(&self, id: &str) -> Result<()>
pub fn delete_thread(&self, id: &str) -> Result<()>
pub fn set_thread_memory_mode(&self, id: &str, mode: Option<&str>) -> Result<()>
pub fn get_thread_memory_mode(&self, id: &str) -> Result<Option<String>>
pub fn persist_dynamic_tools( &self, thread_id: &str, tools: &[DynamicToolRecord], ) -> Result<()>
pub fn get_dynamic_tools( &self, thread_id: &str, ) -> Result<Vec<DynamicToolRecord>>
pub fn append_message( &self, thread_id: &str, role: &str, content: &str, item: Option<Value>, ) -> Result<i64>
pub fn list_messages( &self, thread_id: &str, limit: Option<usize>, ) -> Result<Vec<MessageRecord>>
pub fn clear_messages(&self, thread_id: &str) -> Result<usize>
pub fn save_checkpoint( &self, thread_id: &str, checkpoint_id: &str, state: &Value, ) -> Result<()>
pub fn load_checkpoint( &self, thread_id: &str, checkpoint_id: Option<&str>, ) -> Result<Option<CheckpointRecord>>
pub fn list_checkpoints( &self, thread_id: &str, limit: Option<usize>, ) -> Result<Vec<CheckpointRecord>>
pub fn delete_checkpoint( &self, thread_id: &str, checkpoint_id: &str, ) -> Result<()>
pub fn upsert_job(&self, job: &JobStateRecord) -> Result<()>
pub fn get_job(&self, id: &str) -> Result<Option<JobStateRecord>>
pub fn list_jobs(&self, limit: Option<usize>) -> Result<Vec<JobStateRecord>>
pub fn delete_job(&self, id: &str) -> Result<()>
pub fn find_rollout_path_by_id(&self, id: &str) -> Result<Option<PathBuf>>
pub fn append_thread_name( &self, thread_id: &str, thread_name: Option<String>, updated_at: i64, rollout_path: Option<PathBuf>, ) -> Result<()>
pub fn find_thread_name_by_id(&self, thread_id: &str) -> Result<Option<String>>
pub fn find_thread_names_by_ids( &self, ids: &[String], ) -> Result<HashMap<String, Option<String>>>
pub fn find_thread_path_by_name_str( &self, name: &str, ) -> Result<Option<PathBuf>>
Trait Implementations§
Source§impl Clone for StateStore
impl Clone for StateStore
Source§fn clone(&self) -> StateStore
fn clone(&self) -> StateStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StateStore
impl RefUnwindSafe for StateStore
impl Send for StateStore
impl Sync for StateStore
impl Unpin for StateStore
impl UnsafeUnpin for StateStore
impl UnwindSafe for StateStore
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