Class RealtimeTruncationRetentionRatio.Builder
-
- All Implemented Interfaces:
public final class RealtimeTruncationRetentionRatio.BuilderA builder for RealtimeTruncationRetentionRatio.
-
-
Method Summary
-
-
Method Detail
-
retentionRatio
final RealtimeTruncationRetentionRatio.Builder retentionRatio(Double retentionRatio)
Fraction of post-instruction conversation tokens to retain (
0.0-1.0) when the conversation exceeds the input token limit. Setting this to0.8means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.
-
retentionRatio
final RealtimeTruncationRetentionRatio.Builder retentionRatio(JsonField<Double> retentionRatio)
Sets Builder.retentionRatio to an arbitrary JSON value.
You should usually call Builder.retentionRatio with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final RealtimeTruncationRetentionRatio.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("retention_ratio")This method is primarily for setting the field to an undocumented or not yet supported value.
-
tokenLimits
final RealtimeTruncationRetentionRatio.Builder tokenLimits(RealtimeTruncationRetentionRatio.TokenLimits tokenLimits)
Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.
-
tokenLimits
final RealtimeTruncationRetentionRatio.Builder tokenLimits(JsonField<RealtimeTruncationRetentionRatio.TokenLimits> tokenLimits)
Sets Builder.tokenLimits to an arbitrary JSON value.
You should usually call Builder.tokenLimits with a well-typed TokenLimits value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final RealtimeTruncationRetentionRatio.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RealtimeTruncationRetentionRatio.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RealtimeTruncationRetentionRatio.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RealtimeTruncationRetentionRatio.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RealtimeTruncationRetentionRatio.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RealtimeTruncationRetentionRatio build()
Returns an immutable instance of RealtimeTruncationRetentionRatio.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.retentionRatio()
-
-
-
-