class RerankingUsage extends Usage

Methods

__construct(int $inputTokens = 0, float|null $searchUnits = null)

Create reranking usage data.

int
totalTokens()

Get the total number of input and output tokens.

from  Usage
array
toArray()

Get the instance as an array.

array
jsonSerialize()

Get the JSON serializable representation of the instance.

from  Usage

Details

at line 15
__construct(int $inputTokens = 0, float|null $searchUnits = null)

Create reranking usage data.

Parameters

int $inputTokens
float|null $searchUnits

billed search units, or null when unreported

in Usage at line 24
int totalTokens()

Get the total number of input and output tokens.

Return Value

int

at line 25
array toArray()

Get the instance as an array.

Return Value

array

in Usage at line 43
array jsonSerialize()

Get the JSON serializable representation of the instance.

Return Value

array