bmel:flatten¶
Category: Array & Statistics · Returns: bmel:array
Signature
bmel:flatten(array: bmel:array)
Description¶
Flattens one level of nested arrays into a single flat array.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
array | bmel:array | The nested array to flatten. |
Examples¶
All tool calls of a run in one list
bmel:flatten({createChatCompletion:Response Payload[]}.$.choices.message.tool_calls)
How many tool calls the run made
bmel:count(bmel:flatten({createChatCompletion:Response Payload[]}.$.choices.message.tool_calls))