Class BetaThreadCreateAndRunParams.TruncationStrategy
-
- All Implemented Interfaces:
public final class BetaThreadCreateAndRunParams.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 classBetaThreadCreateAndRunParams.TruncationStrategy.BuilderA builder for TruncationStrategy.
public final classBetaThreadCreateAndRunParams.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 BetaThreadCreateAndRunParams.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<BetaThreadCreateAndRunParams.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 BetaThreadCreateAndRunParams.TruncationStrategyvalidate()final BetaThreadCreateAndRunParams.TruncationStrategy.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaThreadCreateAndRunParams.TruncationStrategy.Builderbuilder()-
-
Method Detail
-
type
final BetaThreadCreateAndRunParams.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<BetaThreadCreateAndRunParams.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 BetaThreadCreateAndRunParams.TruncationStrategy validate()
-
toBuilder
final BetaThreadCreateAndRunParams.TruncationStrategy.Builder toBuilder()
-
builder
final static BetaThreadCreateAndRunParams.TruncationStrategy.Builder builder()
-
-
-
-