Class Diagnostics.Builder
-
- All Implemented Interfaces:
public final class Diagnostics.BuilderA builder for Diagnostics.
-
-
Method Summary
Modifier and Type Method Description final Diagnostics.BuildercacheMissReason(CacheMissReason cacheMissReason)Explains why the prompt cache could not fully reuse the prefix from the request identified by diagnostics.previous_message_id.final Diagnostics.BuildercacheMissReason(Optional<CacheMissReason> cacheMissReason)Alias for calling Builder.cacheMissReason with cacheMissReason.orElse(null).final Diagnostics.BuildercacheMissReason(JsonField<CacheMissReason> cacheMissReason)Sets Builder.cacheMissReason to an arbitrary JSON value. final Diagnostics.BuildercacheMissReason(CacheMissModelChanged modelChanged)Alias for calling cacheMissReason with CacheMissReason.ofModelChanged(modelChanged).final Diagnostics.BuildercacheMissReason(CacheMissSystemChanged systemChanged)Alias for calling cacheMissReason with CacheMissReason.ofSystemChanged(systemChanged).final Diagnostics.BuildercacheMissReason(CacheMissToolsChanged toolsChanged)Alias for calling cacheMissReason with CacheMissReason.ofToolsChanged(toolsChanged).final Diagnostics.BuildercacheMissReason(CacheMissMessagesChanged messagesChanged)Alias for calling cacheMissReason with CacheMissReason.ofMessagesChanged(messagesChanged).final Diagnostics.BuildercacheMissReason(CacheMissPreviousMessageNotFound previousMessageNotFound)Alias for calling cacheMissReason with CacheMissReason.ofPreviousMessageNotFound(previousMessageNotFound).final Diagnostics.BuildercacheMissReason(CacheMissUnavailable unavailable)Alias for calling cacheMissReason with CacheMissReason.ofUnavailable(unavailable).final Diagnostics.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Diagnostics.BuildermodelChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: CacheMissModelChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final Diagnostics.BuildersystemChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: CacheMissSystemChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final Diagnostics.BuildertoolsChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: CacheMissToolsChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final Diagnostics.BuildermessagesChangedCacheMissReason(Long cacheMissedInputTokens)Alias for calling cacheMissReason with the following: CacheMissMessagesChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()final Diagnostics.BuilderputAdditionalProperty(String key, JsonValue value)final Diagnostics.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Diagnostics.BuilderremoveAdditionalProperty(String key)final Diagnostics.BuilderremoveAllAdditionalProperties(Set<String> keys)final Diagnosticsbuild()Returns an immutable instance of Diagnostics. -
-
Method Detail
-
cacheMissReason
final Diagnostics.Builder cacheMissReason(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 Diagnostics.Builder cacheMissReason(Optional<CacheMissReason> cacheMissReason)
Alias for calling Builder.cacheMissReason with
cacheMissReason.orElse(null).
-
cacheMissReason
final Diagnostics.Builder cacheMissReason(JsonField<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 Diagnostics.Builder cacheMissReason(CacheMissModelChanged modelChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofModelChanged(modelChanged).
-
cacheMissReason
final Diagnostics.Builder cacheMissReason(CacheMissSystemChanged systemChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofSystemChanged(systemChanged).
-
cacheMissReason
final Diagnostics.Builder cacheMissReason(CacheMissToolsChanged toolsChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofToolsChanged(toolsChanged).
-
cacheMissReason
final Diagnostics.Builder cacheMissReason(CacheMissMessagesChanged messagesChanged)
Alias for calling cacheMissReason with
CacheMissReason.ofMessagesChanged(messagesChanged).
-
cacheMissReason
final Diagnostics.Builder cacheMissReason(CacheMissPreviousMessageNotFound previousMessageNotFound)
Alias for calling cacheMissReason with
CacheMissReason.ofPreviousMessageNotFound(previousMessageNotFound).
-
cacheMissReason
final Diagnostics.Builder cacheMissReason(CacheMissUnavailable unavailable)
Alias for calling cacheMissReason with
CacheMissReason.ofUnavailable(unavailable).
-
additionalProperties
final Diagnostics.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
modelChangedCacheMissReason
final Diagnostics.Builder modelChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
CacheMissModelChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
systemChangedCacheMissReason
final Diagnostics.Builder systemChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
CacheMissSystemChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
toolsChangedCacheMissReason
final Diagnostics.Builder toolsChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
CacheMissToolsChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
messagesChangedCacheMissReason
final Diagnostics.Builder messagesChangedCacheMissReason(Long cacheMissedInputTokens)
Alias for calling cacheMissReason with the following:
CacheMissMessagesChanged.builder() .cacheMissedInputTokens(cacheMissedInputTokens) .build()
-
putAdditionalProperty
final Diagnostics.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Diagnostics.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Diagnostics.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Diagnostics.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final Diagnostics build()
Returns an immutable instance of Diagnostics.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.cacheMissReason()
-
-
-
-