OpenAI::RealtimeTruncationRetentionRatioTruncation
Inherits JSON::Serializable < Reference < Object
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.
Constructors
Instance methods
Fraction of post-instruction conversation tokens to retain (0.0 - 1.0) when the conversation exceeds the input token limit. Setting this to 0.8 means 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.
Fraction of post-instruction conversation tokens to retain (0.0 - 1.0) when the conversation exceeds the input token limit. Setting this to 0.8 means 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.
Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.
Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.
Use retention ratio truncation.