Interface BetaCacheMissReason.Visitor
-
- All Implemented Interfaces:
public interface BetaCacheMissReason.Visitor<T extends Object>An interface that defines how to map each variant of BetaCacheMissReason to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitModelChanged(BetaCacheMissModelChanged modelChanged)A cache_miss_reasonfor a request whosemodelorspeeddiffers from the previous request's.abstract TvisitSystemChanged(BetaCacheMissSystemChanged systemChanged)A cache_miss_reasonfor a request whosesystemdiffers from the previous request's.abstract TvisitToolsChanged(BetaCacheMissToolsChanged toolsChanged)A cache_miss_reasonfor a request whosetoolsdiffer from the previous request's, for example because tools were added, removed, or reordered.abstract TvisitMessagesChanged(BetaCacheMissMessagesChanged messagesChanged)A cache_miss_reasonfor a request whosemessagesdiffer from the previous request's in an earlier entry, instead of only having entries appended.abstract TvisitPreviousMessageNotFound(BetaCacheMissPreviousMessageNotFound previousMessageNotFound)A cache_miss_reasonfor when the API doesn't have a stored record of the request thatdiagnostics.previous_message_idreferences.abstract TvisitUnavailable(BetaCacheMissUnavailable unavailable)A cache_miss_reasonfor when the API can't give a diagnosis.Tunknown(JsonValue json)Maps an unknown variant of BetaCacheMissReason to a value of type T. -
-
Method Detail
-
visitModelChanged
abstract T visitModelChanged(BetaCacheMissModelChanged modelChanged)
A
cache_miss_reasonfor a request whosemodelorspeeddiffers from the previous request's.See the cache diagnostics guide to learn what to change for each reason.
-
visitSystemChanged
abstract T visitSystemChanged(BetaCacheMissSystemChanged systemChanged)
A
cache_miss_reasonfor a request whosesystemdiffers from the previous request's.See the cache diagnostics guide to learn what to change for each reason.
-
visitToolsChanged
abstract T visitToolsChanged(BetaCacheMissToolsChanged toolsChanged)
A
cache_miss_reasonfor a request whosetoolsdiffer from the previous request's, for example because tools were added, removed, or reordered.See the cache diagnostics guide to learn what to change for each reason.
-
visitMessagesChanged
abstract T visitMessagesChanged(BetaCacheMissMessagesChanged messagesChanged)
A
cache_miss_reasonfor a request whosemessagesdiffer from the previous request's in an earlier entry, instead of only having entries appended. Themodel,system, andtoolsmatch.See the cache diagnostics guide to learn what to change for each reason.
-
visitPreviousMessageNotFound
abstract T visitPreviousMessageNotFound(BetaCacheMissPreviousMessageNotFound previousMessageNotFound)
A
cache_miss_reasonfor when the API doesn't have a stored record of the request thatdiagnostics.previous_message_idreferences.This doesn't mean that this request changed.
See the cache diagnostics guide to learn what to change for each reason.
-
visitUnavailable
abstract T visitUnavailable(BetaCacheMissUnavailable unavailable)
A
cache_miss_reasonfor when the API can't give a diagnosis. The request itself was processed normally.This includes a request whose
model,system, andtoolsmatch the previous request's but whose other prompt-affecting parameters, such asthinkingortool_choice, differ.See the cache diagnostics guide to learn what to change for each reason.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaCacheMissReason to a value of type T.
An instance of BetaCacheMissReason can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-