ai_function
marvin.components.ai_function
¶
AIFunction
¶
map
¶
Map the AI function over a sequence of arguments. Runs concurrently.
Arguments should be provided as if calling the function normally, but each argument must be a list. The function is called once for each item in the list, and the results are returned in a list.
This method should be called synchronously.
For example, fn.map([1, 2]) is equivalent to [fn(1), fn(2)].
fn.map([1, 2], x=['a', 'b']) is equivalent to [fn(1, x='a'), fn(2, x='b')].