pub struct ConversationState { /* private fields */ }Implementations§
Source§impl ConversationState
impl ConversationState
pub fn new(session: [u8; 12]) -> Self
pub fn recover( session: [u8; 12], boxes: Vec<ChatBox>, force: bool, ) -> Result<Self, String>
pub fn boxes(&self) -> &[ChatBox]
pub fn status(&self) -> Status
pub fn accept( &mut self, box_type: String, contents: String, hidden_type: String, hidden_contents: String, ) -> Result<(), String>
pub fn accept_tool_message( &mut self, id: ToolCallId, message: String, ) -> Result<(), String>
pub fn accept_tool_return( &mut self, id: ToolCallId, result: Result<String, String>, ) -> Result<(), String>
pub fn accept_tool_return_v2( &mut self, id: ToolCallId, result: Result<String, String>, metadata_type: String, metadata_contents: String, ) -> Result<(), String>
pub fn accept_idle_context_box( &mut self, box_type: String, contents: String, hidden_type: String, hidden_contents: String, ) -> Result<(), String>
pub fn accept_idle_context_tool_call( &mut self, name: String, arguments: String, ) -> Result<ToolCallId, String>
pub fn accept_idle_context_tool_return( &mut self, id: ToolCallId, result: Result<String, String>, ) -> Result<(), String>
pub fn begin(&mut self) -> Result<Option<Start>, String>
pub fn prepare_stage( &mut self, job: u64, text: String, values: Vec<BoxValue>, ) -> Result<Vec<PreparedCall>, String>
pub fn mailbox_flush(&mut self, job: u64) -> Result<Vec<ChatBox>, String>
pub fn prepare_mailbox_flush( &mut self, job: u64, ) -> Result<Option<PreparedMailboxFlush>, String>
pub fn validate_mailbox_flush( &self, value: &PreparedMailboxFlush, ) -> Result<(), String>
pub fn commit_mailbox_flush( &mut self, value: PreparedMailboxFlush, ) -> Result<(), String>
pub fn complete( &mut self, job: u64, output: ShimOutput<BoxValue>, ) -> Result<(), String>
pub fn fail(&mut self, job: u64, message: String, restartable: bool)
pub fn restart(&mut self) -> Result<(), RestartError>
Auto Trait Implementations§
impl Freeze for ConversationState
impl RefUnwindSafe for ConversationState
impl Send for ConversationState
impl Sync for ConversationState
impl Unpin for ConversationState
impl UnsafeUnpin for ConversationState
impl UnwindSafe for ConversationState
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