Class RunStep.Usage
-
- All Implemented Interfaces:
public final class RunStep.Usage
Usage statistics related to the run step. This value will be
null
while the run step's status isin_progress
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RunStep.Usage.Builder
A builder for Usage.
-
Method Summary
Modifier and Type Method Description final Long
completionTokens()
Number of completion tokens used over the course of the run step. final Long
promptTokens()
Number of prompt tokens used over the course of the run step. final Long
totalTokens()
Total number of tokens used (prompt + completion). final JsonField<Long>
_completionTokens()
Returns the raw JSON value of completionTokens. final JsonField<Long>
_promptTokens()
Returns the raw JSON value of promptTokens. final JsonField<Long>
_totalTokens()
Returns the raw JSON value of totalTokens. final Map<String, JsonValue>
_additionalProperties()
final RunStep.Usage.Builder
toBuilder()
final RunStep.Usage
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RunStep.Usage.Builder
builder()
Returns a mutable builder for constructing an instance of Usage. -
-
Method Detail
-
completionTokens
final Long completionTokens()
Number of completion tokens used over the course of the run step.
-
promptTokens
final Long promptTokens()
Number of prompt tokens used over the course of the run step.
-
totalTokens
final Long totalTokens()
Total number of tokens used (prompt + completion).
-
_completionTokens
final JsonField<Long> _completionTokens()
Returns the raw JSON value of completionTokens.
Unlike completionTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_promptTokens
final JsonField<Long> _promptTokens()
Returns the raw JSON value of promptTokens.
Unlike promptTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_totalTokens
final JsonField<Long> _totalTokens()
Returns the raw JSON value of totalTokens.
Unlike totalTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RunStep.Usage.Builder toBuilder()
-
validate
final RunStep.Usage validate()
-
builder
final static RunStep.Usage.Builder builder()
Returns a mutable builder for constructing an instance of Usage.
The following fields are required:
.completionTokens() .promptTokens() .totalTokens()
-
-
-
-