Package com.anthropic.helpers
Class BetaFallbackState
-
- All Implemented Interfaces:
public final class BetaFallbackStateTracks which fallback a sequence of requests is pinned to.
Create one (create) and pass it via the RequestOptions.Builder.fallbackState request option on every request that should share the pin — the turns of one conversation, or any wider scope the stickiness should apply to; BetaRefusalFallbackInterceptor mutates it in place when a model refuses.
-
-
Method Summary
Modifier and Type Method Description final Integerindex()Returns the index into the fallback chain the requests are pinned to. final Unitindex(Integer index)Sets the index into the fallback chain the requests are pinned to (index). final static BetaFallbackStatecreate()Returns a new BetaFallbackState pinned to the original request params. -
-
Method Detail
-
index
final Integer index()
Returns the index into the fallback chain the requests are pinned to.
-1 targets the original request params; the interceptor sets it to the index of the fallback that accepted the request.
-
index
final Unit index(Integer index)
Sets the index into the fallback chain the requests are pinned to (index).
-
create
final static BetaFallbackState create()
Returns a new BetaFallbackState pinned to the original request params.
-
-
-
-