Skip to main content

function_node

Function function_node 

Source
pub fn function_node<In, Out, F, Fut>(
    name: &str,
    f: F,
    cfg: NodeConfig,
) -> Arc<dyn Node> ⓘ
where In: DeserializeOwned + JsonSchema + Send + 'static, Out: Serialize + Send + 'static, F: Fn(Context, In) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Out, AgentError>> + Send + 'static,
Expand description

A node that runs f on its (converted) input.