Class BetaFallbackBlock
-
- All Implemented Interfaces:
public final class BetaFallbackBlockMarks the point in
contentwhere one model's output gives way to the next.One block appears per hop where a preceding model actually ran this turn and declined. A turn routed directly by the sticky decision has no such boundary and carries no block — the signal for whether a fallback model served the response is the presence of a
fallback_messageentry inusage.iterations, not this block.The block is treated like a server-tool content block for streaming: it arrives via the standard
content_block_start/content_block_stoppair and carries no deltas.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaFallbackBlock.BuilderA builder for BetaFallbackBlock.
-
Method Summary
Modifier and Type Method Description final BetaFallbackBlockParamtoParam()final BetaFallbackInfofrom()The model whose output ends at this point — the model that declined at this hop. final BetaFallbackInfoto()The fallback model producing the content that follows this block. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("fallback")final JsonField<BetaFallbackInfo>_from()Returns the raw JSON value of from. final JsonField<BetaFallbackInfo>_to()Returns the raw JSON value of to. final Map<String, JsonValue>_additionalProperties()final BetaFallbackBlock.BuildertoBuilder()final BetaFallbackBlockvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaFallbackBlock.Builderbuilder()Returns a mutable builder for constructing an instance of BetaFallbackBlock. -
-
Method Detail
-
toParam
final BetaFallbackBlockParam toParam()
-
from
final BetaFallbackInfo from()
The model whose output ends at this point — the model that declined at this hop. When the declining hop is the requested model, its
modelechoes the top-levelmodelstring the caller sent (alias or canonical); when the declining hop is a fallback model, itsmodelis that model's canonical id.
-
to
final BetaFallbackInfo to()
The fallback model producing the content that follows this block. Its
modelis always the canonical id.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("fallback")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_from
final JsonField<BetaFallbackInfo> _from()
Returns the raw JSON value of from.
Unlike from, this method doesn't throw if the JSON field has an unexpected type.
-
_to
final JsonField<BetaFallbackInfo> _to()
Returns the raw JSON value of to.
Unlike to, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaFallbackBlock.Builder toBuilder()
-
validate
final BetaFallbackBlock validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaFallbackBlock.Builder builder()
Returns a mutable builder for constructing an instance of BetaFallbackBlock.
The following fields are required:
.from() .to()
-
-
-
-