pub struct Session { /* private fields */ }Implementations§
Source§impl Session
impl Session
pub fn start(runner: Box<dyn PromptRunner>, model: String) -> Session
pub fn start_with<F>(model: String, build_runner: F) -> Session
pub fn start_with_log<F>( model: String, log_path: Option<PathBuf>, build_runner: F, ) -> Result<Session, String>
pub fn start_with_log_io<F>( model: String, log_path: Option<PathBuf>, err: &mut dyn Write, build_runner: F, ) -> Result<Session, String>
pub fn approver(&self) -> Arc<SurfaceApprover> ⓘ
pub fn answer_approval( &self, id: &str, answer: ApprovalAnswer, ) -> Result<u64, AnswerError>
pub fn stop_run(&self)
pub fn submit( &self, text: &str, attachments: Vec<Attachment>, ) -> Result<u64, String>
pub fn entries_after(&self, after: u64, wait: Duration) -> Vec<Entry>
pub fn info(&self) -> SessionInfo
pub fn set_model(&self, model: &str) -> Result<(), String>
pub fn set_effort(&self, effort: Option<&str>) -> Result<(), String>
pub fn record_decision( &self, run: &str, action: &str, note: Option<&str>, orchestrator_message: Option<&str>, ) -> Result<u64, String>
pub fn queue_for_request( &self, request_id: &str, text: &str, ) -> Result<u64, String>
pub fn record_error(&self, message: &str) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Forget for Session
impl Freeze for Session
impl Move 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