Class Run.Usage
-
- All Implemented Interfaces:
public final class Run.UsageUsage statistics related to the run. This value will be
nullif the run is not in a terminal state (i.e.in_progress,queued, etc.).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRun.Usage.BuilderA builder for Usage.
-
Method Summary
Modifier and Type Method Description final LongcompletionTokens()Number of completion tokens used over the course of the run. final LongpromptTokens()Number of prompt tokens used over the course of the run. final LongtotalTokens()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 Run.Usage.BuildertoBuilder()final Run.Usagevalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Run.Usage.Builderbuilder()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.
-
promptTokens
final Long promptTokens()
Number of prompt tokens used over the course of the run.
-
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 Run.Usage.Builder toBuilder()
-
builder
final static Run.Usage.Builder builder()
Returns a mutable builder for constructing an instance of Usage.
The following fields are required:
.completionTokens() .promptTokens() .totalTokens()
-
-
-
-