Class BetaDiagnostics.Builder
-
- All Implemented Interfaces:
public final class BetaDiagnostics.BuilderA builder for BetaDiagnostics.
-
-
Method Summary
Modifier and Type Method Description final BetaDiagnostics.BuildercacheMissReason(BetaDiagnostics.CacheMissReason cacheMissReason)Explains why the prompt cache could not fully reuse the prefix from the request identified by diagnostics.previous_message_id.final BetaDiagnostics.BuildercacheMissReason(Optional<BetaDiagnostics.CacheMissReason> cacheMissReason)Alias for calling Builder.cacheMissReason with cacheMissReason.orElse(null).final BetaDiagnostics.BuildercacheMissReason(JsonField<BetaDiagnostics.CacheMissReason> cacheMissReason)Sets Builder.cacheMissReason to an arbitrary JSON value. final BetaDiagnostics.BuildercacheMissReason(BetaCacheMissModelChanged modelChanged)Alias for calling cacheMissReason with CacheMissReason.ofModelChanged(modelChanged).final BetaDiagnostics.BuildercacheMissReason(BetaCacheMissSystemChanged systemChanged)Alias for calling cacheMissReason with CacheMissReason.ofSystemChanged(systemChanged).final BetaDiagnostics.BuildercacheMissReason(BetaCacheMissToolsChanged toolsChanged)Alias for calling cacheMissReason with CacheMissReason.ofToolsChanged(toolsChanged).final BetaDiagnostics.BuildercacheMissReason(BetaCacheMissMessagesChanged messagesChanged)Alias for calling cacheMissReason with CacheMissReason.ofMessagesChanged(messagesChanged).final BetaDiagnostics.BuildercacheMissReason(BetaCacheMissPreviousMessageNotFound previousMessageNotFound)Alias for calling cacheMissReason with CacheMissReason.ofPreviousMessageNotFound(previousMessageNotFound).final BetaDiagnostics.BuildercacheMissReason(BetaCacheMissUnavailable unavailable)Alias for calling cacheMissReason with CacheMissReason.ofUnavailable(unavailable).final BetaDiagnostics.BuildermodelChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: BetaCacheMissModelChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final BetaDiagnostics.BuildersystemChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: BetaCacheMissSystemChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final BetaDiagnostics.BuildertoolsChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: BetaCacheMissToolsChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final BetaDiagnostics.BuildermessagesChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: BetaCacheMissMessagesChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final BetaDiagnostics.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaDiagnostics.BuilderputAdditionalProperty(String key, JsonValue value)final BetaDiagnostics.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaDiagnostics.BuilderremoveAdditionalProperty(String key)final BetaDiagnostics.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaDiagnosticsbuild()Returns an immutable instance of BetaDiagnostics. -
-
Method Detail
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(BetaDiagnostics.CacheMissReason cacheMissReason)
Explains why the prompt cache could not fully reuse the prefix from the request identified by
diagnostics.previous_message_id.nullmeans diagnosis is still pending — the response was serialized before the background comparison completed.
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(Optional<BetaDiagnostics.CacheMissReason> cacheMissReason)
Alias for calling Builder.cacheMissReason with
cacheMissReason.orElse(null).
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(JsonField<BetaDiagnostics.CacheMissReason> cacheMissReason)
Sets Builder.cacheMissReason to an arbitrary JSON value.
You should usually call Builder.cacheMissReason with a well-typed CacheMissReason value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(BetaCacheMissModelChanged modelChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofModelChanged(modelChanged).
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(BetaCacheMissSystemChanged systemChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofSystemChanged(systemChanged).
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(BetaCacheMissToolsChanged toolsChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofToolsChanged(toolsChanged).
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(BetaCacheMissMessagesChanged messagesChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofMessagesChanged(messagesChanged).
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(BetaCacheMissPreviousMessageNotFound previousMessageNotFound)
Alias for calling cacheMissReason with
CacheMissReason.ofPreviousMessageNotFound(previousMessageNotFound).
-
cacheMissReason
final BetaDiagnostics.Builder cacheMissReason(BetaCacheMissUnavailable unavailable)
Alias for calling cacheMissReason with
CacheMissReason.ofUnavailable(unavailable).
-
modelChangedCacheMissReason
final BetaDiagnostics.Builder modelChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
BetaCacheMissModelChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
systemChangedCacheMissReason
final BetaDiagnostics.Builder systemChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
BetaCacheMissSystemChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
toolsChangedCacheMissReason
final BetaDiagnostics.Builder toolsChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
BetaCacheMissToolsChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
messagesChangedCacheMissReason
final BetaDiagnostics.Builder messagesChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
BetaCacheMissMessagesChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
additionalProperties
final BetaDiagnostics.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaDiagnostics.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaDiagnostics.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaDiagnostics.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaDiagnostics.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaDiagnostics build()
Returns an immutable instance of BetaDiagnostics.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.cacheMissReason()
-
-
-
-