Interface CacheMissReason.Visitor
-
- All Implemented Interfaces:
public interface CacheMissReason.Visitor<T extends Object>An interface that defines how to map each variant of CacheMissReason to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitModelChanged(CacheMissModelChanged modelChanged)A cache_miss_reasonfor a request whosemodelorspeeddiffers from the previous request's.abstract TvisitSystemChanged(CacheMissSystemChanged systemChanged)A cache_miss_reasonfor a request whosesystemdiffers from the previous request's.abstract TvisitToolsChanged(CacheMissToolsChanged toolsChanged)A cache_miss_reasonfor a request whosetoolsdiffer from the previous request's, for example because tools were added, removed, or reordered.abstract TvisitMessagesChanged(CacheMissMessagesChanged 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(CacheMissPreviousMessageNotFound previousMessageNotFound)A cache_miss_reasonfor when the API doesn't have a stored record of the request thatdiagnostics.previous_message_idreferences.abstract TvisitUnavailable(CacheMissUnavailable unavailable)A cache_miss_reasonfor when the API can't give a diagnosis.Tunknown(JsonValue json)Maps an unknown variant of CacheMissReason to a value of type T. -
-
Method Detail
-
visitModelChanged
abstract T visitModelChanged(CacheMissModelChanged 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(CacheMissSystemChanged 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(CacheMissToolsChanged 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(CacheMissMessagesChanged 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(CacheMissPreviousMessageNotFound 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(CacheMissUnavailable 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 CacheMissReason to a value of type T.
An instance of CacheMissReason 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.
-
-
-
-