Class RealtimeTruncationRetentionRatio
-
- All Implemented Interfaces:
public final class RealtimeTruncationRetentionRatio
Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RealtimeTruncationRetentionRatio.Builder
A builder for RealtimeTruncationRetentionRatio.
-
Method Summary
Modifier and Type Method Description final Double
retentionRatio()
Fraction of post-instruction conversation tokens to retain (0.0 - 1.0) when the conversation exceeds the input token limit. final JsonValue
_type()
Use retention ratio truncation. final JsonField<Double>
_retentionRatio()
Returns the raw JSON value of retentionRatio. final Map<String, JsonValue>
_additionalProperties()
final RealtimeTruncationRetentionRatio.Builder
toBuilder()
final RealtimeTruncationRetentionRatio
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RealtimeTruncationRetentionRatio.Builder
builder()
Returns a mutable builder for constructing an instance of RealtimeTruncationRetentionRatio. -
-
Method Detail
-
retentionRatio
final Double retentionRatio()
Fraction of post-instruction conversation tokens to retain (0.0 - 1.0) when the conversation exceeds the input token limit.
-
_type
final JsonValue _type()
Use retention ratio truncation.
Expected to always return the following:
JsonValue.from("retention_ratio")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_retentionRatio
final JsonField<Double> _retentionRatio()
Returns the raw JSON value of retentionRatio.
Unlike retentionRatio, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeTruncationRetentionRatio.Builder toBuilder()
-
validate
final RealtimeTruncationRetentionRatio validate()
-
builder
final static RealtimeTruncationRetentionRatio.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeTruncationRetentionRatio.
The following fields are required:
.retentionRatio()
-
-
-
-