Class DoneEvent.Builder
- All Implemented Interfaces:
DoneEvent._FinalStage,DoneEvent.EventStage,DoneEvent.InferenceBalanceCentsChargedStage,DoneEvent.InputTokensStage,DoneEvent.ModelStage,DoneEvent.OutputTokensStage,DoneEvent.PlatformCreditsChargedStage
- Enclosing class:
DoneEvent
-
Method Summary
Modifier and TypeMethodDescriptionadditionalProperties(Map<String, Object> additionalProperties) additionalProperty(String key, Object value) build()cacheCreateTokens(Integer cacheCreateTokens) Number of tokens written to the prompt cache.cacheCreateTokens(Optional<Integer> cacheCreateTokens) Number of tokens written to the prompt cache.cacheReadTokens(Integer cacheReadTokens) Number of input tokens served from the prompt cache.cacheReadTokens(Optional<Integer> cacheReadTokens) Number of input tokens served from the prompt cache.event(@NotNull DoneEventEvent event) Backward-compatible alias oftype.inferenceBalanceCentsCharged(long inferenceBalanceCentsCharged) Cents debited from your pre-paid inference balance for the model's token cost.inputTokens(int inputTokens) Total input tokens consumed by the model, including the system prompt and all messages.The model alias used for this call.outputTokens(int outputTokens) Total output tokens generated by the model.platformCreditsCharged(double platformCreditsCharged) Credits debited from your monthly plan allowance for this call's per-call platform overhead.
-
Method Details
-
from
- Specified by:
fromin interfaceDoneEvent.EventStage
-
event
Backward-compatible alias of
type. Alwaysdone.Backward-compatible alias of
type. Alwaysdone.- Specified by:
eventin interfaceDoneEvent.EventStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
inputTokens
Total input tokens consumed by the model, including the system prompt and all messages.
Total input tokens consumed by the model, including the system prompt and all messages.
- Specified by:
inputTokensin interfaceDoneEvent.InputTokensStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
outputTokens
Total output tokens generated by the model.
Total output tokens generated by the model.
- Specified by:
outputTokensin interfaceDoneEvent.OutputTokensStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
model
The model alias used for this call.
The model alias used for this call.
- Specified by:
modelin interfaceDoneEvent.ModelStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
platformCreditsCharged
public DoneEvent.InferenceBalanceCentsChargedStage platformCreditsCharged(double platformCreditsCharged) Credits debited from your monthly plan allowance for this call's per-call platform overhead. One credit equals one cent.
Credits debited from your monthly plan allowance for this call's per-call platform overhead. One credit equals one cent.
- Specified by:
platformCreditsChargedin interfaceDoneEvent.PlatformCreditsChargedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
inferenceBalanceCentsCharged
Cents debited from your pre-paid inference balance for the model's token cost.
Cents debited from your pre-paid inference balance for the model's token cost.
- Specified by:
inferenceBalanceCentsChargedin interfaceDoneEvent.InferenceBalanceCentsChargedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
cacheCreateTokens
Number of tokens written to the prompt cache. Present only when prompt caching applied to this call. Prompt caching is not yet used; this field is reserved for forward compatibility.
- Specified by:
cacheCreateTokensin interfaceDoneEvent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
cacheCreateTokens
Number of tokens written to the prompt cache. Present only when prompt caching applied to this call. Prompt caching is not yet used; this field is reserved for forward compatibility.
- Specified by:
cacheCreateTokensin interfaceDoneEvent._FinalStage
-
cacheReadTokens
Number of input tokens served from the prompt cache. Present only when prompt caching applied to this call. Prompt caching is not yet used; this field is reserved for forward compatibility.
- Specified by:
cacheReadTokensin interfaceDoneEvent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
cacheReadTokens
Number of input tokens served from the prompt cache. Present only when prompt caching applied to this call. Prompt caching is not yet used; this field is reserved for forward compatibility.
- Specified by:
cacheReadTokensin interfaceDoneEvent._FinalStage
-
build
- Specified by:
buildin interfaceDoneEvent._FinalStage
-
additionalProperty
- Specified by:
additionalPropertyin interfaceDoneEvent._FinalStage
-
additionalProperties
- Specified by:
additionalPropertiesin interfaceDoneEvent._FinalStage
-