(mut self, callback: F)
| 381 | } |
| 382 | |
| 383 | pub fn with_ask_question<F, Fut>(mut self, callback: F) -> Self |
| 384 | where |
| 385 | F: Fn(Vec<QuestionDef>) -> Fut + Send + Sync + 'static, |
| 386 | Fut: std::future::Future<Output = Result<Vec<Vec<String>>, ToolError>> + Send + 'static, |
| 387 | { |
| 388 | self.ask_question = Some(Arc::new(move |questions| Box::pin(callback(questions)))); |
| 389 | self |
| 390 | } |
| 391 | |
| 392 | pub async fn question( |
| 393 | &self, |