Skip to content

bmel:sum

Category: Array & Statistics · Returns: bmel:number

Signature
bmel:sum(array: bmel:array<number>)

Description

Returns the sum of all numeric values in an array.

Arguments

Parameter Type Required Description
array bmel:array<number> The array of numeric values to sum.

Examples

Tokens of all the LLM calls of a run
bmel:sum({createChatCompletion:Response Payload[]}.$.usage.total_tokens)
Sum of the item prices of an order
bmel:sum({getOrder:Response Payload}.$.items.price)

← Back to BMEL Reference