Skip to main content

builtin_map_reduce

Function builtin_map_reduce 

Source
pub async fn builtin_map_reduce(
    args: &[DslValue],
    ctx: &ReasoningBuiltinContext,
) -> Result<DslValue>
Expand description

Execute the map_reduce builtin: parallel fan-out + aggregate.

Arguments (named via map):

  • inputs: list — items to process
  • mapper: string — system prompt for the mapper
  • reducer: string — system prompt for the reducer

Returns a map with keys: result, mapped_results.