pub trait UserInteractionHandler:
Send
+ Sync
+ Debug {
// Required methods
fn approve_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn approve_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 CreateMessageRequest,
response: &'life2 CreateMessageResult,
) -> Pin<Box<dyn Future<Output = Result<Option<CreateMessageResult>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Interface for user interaction (human-in-the-loop)
Required Methods§
Sourcefn approve_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn approve_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Present sampling request to user for approval
Sourcefn approve_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 CreateMessageRequest,
response: &'life2 CreateMessageResult,
) -> Pin<Box<dyn Future<Output = Result<Option<CreateMessageResult>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn approve_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 CreateMessageRequest,
response: &'life2 CreateMessageResult,
) -> Pin<Box<dyn Future<Output = Result<Option<CreateMessageResult>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Present result to user for review