Functions

Get Function Metrics

GET
/v2/functions/metrics
x-api-key<token>

Authenticate using API Key in request header

In: header

Query Parameters

limit?integer
Default50
Range1 <= value <= 100
functionIDs?array<string>
Items1 <= items
functionNames?array<string>
Items1 <= items
types?array<FunctionType>
Items1 <= items
sortOrder?string

Specifies sorting behavior. The two options are asc and desc to sort ascending and descending respectively, with default sort being ascending. Paging works in both directions.

Default"asc"
Value in"asc" | "desc"
startingAfter?string

A cursor to use in pagination. startingAfter is a function ID that defines your place in the list.

endingBefore?string

A cursor to use in pagination. endingBefore is a function ID that defines your place in the list.

Response Body

application/json

curl -X GET "https://api.bem.ai/v2/functions/metrics"
{
  "functions": [
    {
      "functionName": "invoice-transformer",
      "totalLabeledResults": 54,
      "totalResults": 120,
      "metrics": {
        "accuracy": 0.7407,
        "precision": 0.9524,
        "recall": 0.7692,
        "f1Score": 0.8511,
        "tp": 40,
        "fp": 2,
        "tn": 0,
        "fn": 12
      }
    }
  ],
  "totalCount": 1
}