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