Usage
class Usage implements Arrayable, JsonSerializable
Methods
__construct(int $inputTokens = 0, int $outputTokens = 0)
Create token usage data.
int
totalTokens()
Get the total number of input and output tokens.
array
toArray()
Get the instance as an array.
array
jsonSerialize()
Get the JSON serializable representation of the instance.
Details
at line 15
__construct(int $inputTokens = 0, int $outputTokens = 0)
Create token usage data.
at line 24
int
totalTokens()
Get the total number of input and output tokens.
at line 32
array
toArray()
Get the instance as an array.
at line 43
array
jsonSerialize()
Get the JSON serializable representation of the instance.