Class BetaThreadRunCreateParams.TruncationStrategy
-
- All Implemented Interfaces:
public final class BetaThreadRunCreateParams.TruncationStrategyControls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaThreadRunCreateParams.TruncationStrategy.Builderpublic final classBetaThreadRunCreateParams.TruncationStrategy.TypeThe truncation strategy to use for the thread. The default is
auto. If set tolast_messages, the thread will be truncated to the n most recent messages in the thread. When set toauto, messages in the middle of the thread will be dropped to fit the context length of the model,max_prompt_tokens.
-
Method Summary
Modifier and Type Method Description final BetaThreadRunCreateParams.TruncationStrategy.Typetype()The truncation strategy to use for the thread. final Optional<Long>lastMessages()The number of most recent messages from the thread when constructing the context for the run. final JsonField<BetaThreadRunCreateParams.TruncationStrategy.Type>_type()The truncation strategy to use for the thread. final JsonField<Long>_lastMessages()The number of most recent messages from the thread when constructing the context for the run. final Map<String, JsonValue>_additionalProperties()final BetaThreadRunCreateParams.TruncationStrategyvalidate()final BetaThreadRunCreateParams.TruncationStrategy.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaThreadRunCreateParams.TruncationStrategy.Builderbuilder()-
-
Method Detail
-
type
final BetaThreadRunCreateParams.TruncationStrategy.Type type()
The truncation strategy to use for the thread. The default is
auto. If set tolast_messages, the thread will be truncated to the n most recent messages in the thread. When set toauto, messages in the middle of the thread will be dropped to fit the context length of the model,max_prompt_tokens.
-
lastMessages
final Optional<Long> lastMessages()
The number of most recent messages from the thread when constructing the context for the run.
-
_type
final JsonField<BetaThreadRunCreateParams.TruncationStrategy.Type> _type()
The truncation strategy to use for the thread. The default is
auto. If set tolast_messages, the thread will be truncated to the n most recent messages in the thread. When set toauto, messages in the middle of the thread will be dropped to fit the context length of the model,max_prompt_tokens.
-
_lastMessages
final JsonField<Long> _lastMessages()
The number of most recent messages from the thread when constructing the context for the run.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final BetaThreadRunCreateParams.TruncationStrategy validate()
-
toBuilder
final BetaThreadRunCreateParams.TruncationStrategy.Builder toBuilder()
-
builder
final static BetaThreadRunCreateParams.TruncationStrategy.Builder builder()
-
-
-
-