Functions
mapReduce
Function: mapReduce()
mapReduce(
opts):Runner<{message:string; },string>
Defined in: src/patterns/MapReduce.ts:70
Build a MapReduce Runner. At run time:
- The splitter runs the consumer's
split(input, shardCount)and packs the resulting N shards into a delimited string. - Parallel fans out to N branches. Each branch's wrapper extracts its own shard from the packed input and feeds it to the shared LLMCall.
- The reducer combines the N branch outputs into the final string.
Parameters
opts
Returns
Runner<{ message: string; }, string>
