Class RealtimeTruncation.RetentionRatioTruncation
-
- All Implemented Interfaces:
public final class RealtimeTruncation.RetentionRatioTruncation
Retain a fraction of the conversation tokens.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RealtimeTruncation.RetentionRatioTruncation.Builder
A builder for RetentionRatioTruncation.
-
Method Summary
Modifier and Type Method Description final Double
retentionRatio()
Fraction of pre-instruction conversation tokens to retain (0.0 - 1.0). final JsonValue
_type()
Use retention ratio truncation. final Optional<Long>
postInstructionsTokenLimit()
Optional cap on tokens allowed after the instructions. final JsonField<Double>
_retentionRatio()
Returns the raw JSON value of retentionRatio. final JsonField<Long>
_postInstructionsTokenLimit()
Returns the raw JSON value of postInstructionsTokenLimit. final Map<String, JsonValue>
_additionalProperties()
final RealtimeTruncation.RetentionRatioTruncation.Builder
toBuilder()
final RealtimeTruncation.RetentionRatioTruncation
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RealtimeTruncation.RetentionRatioTruncation.Builder
builder()
Returns a mutable builder for constructing an instance of RetentionRatioTruncation. -
-
Method Detail
-
retentionRatio
final Double retentionRatio()
Fraction of pre-instruction conversation tokens to retain (0.0 - 1.0).
-
_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).
-
postInstructionsTokenLimit
final Optional<Long> postInstructionsTokenLimit()
Optional cap on tokens allowed after the instructions.
-
_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.
-
_postInstructionsTokenLimit
final JsonField<Long> _postInstructionsTokenLimit()
Returns the raw JSON value of postInstructionsTokenLimit.
Unlike postInstructionsTokenLimit, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeTruncation.RetentionRatioTruncation.Builder toBuilder()
-
validate
final RealtimeTruncation.RetentionRatioTruncation validate()
-
builder
final static RealtimeTruncation.RetentionRatioTruncation.Builder builder()
Returns a mutable builder for constructing an instance of RetentionRatioTruncation.
The following fields are required:
.retentionRatio()
-
-
-
-