pub trait HumanLoopProvider: Send + Sync {
// Required method
fn request(
&self,
req: HumanLoopRequest,
) -> Pin<Box<dyn Future<Output = Result<HumanLoopResponse, ReactError>> + Send + '_>>;
}Available on crate feature
human-loop only.Expand description
人工介入 Provider trait
内置实现:
HumanLoopManager:事件驱动模式(推荐)ConsoleHumanLoopProvider:命令行阻塞模式WebhookHumanLoopProvider:HTTP 回调模式WebSocketHumanLoopProvider:WebSocket 模式
Required Methods§
Sourcefn request(
&self,
req: HumanLoopRequest,
) -> Pin<Box<dyn Future<Output = Result<HumanLoopResponse, ReactError>> + Send + '_>>
fn request( &self, req: HumanLoopRequest, ) -> Pin<Box<dyn Future<Output = Result<HumanLoopResponse, ReactError>> + Send + '_>>
发起人工介入请求