Class Run.TruncationStrategy.Builder
-
- All Implemented Interfaces:
public final class Run.TruncationStrategy.Builder
-
-
Constructor Summary
Constructors Constructor Description Run.TruncationStrategy.Builder()
-
Method Summary
Modifier and Type Method Description final Run.TruncationStrategy.Buildertype(Run.TruncationStrategy.Type type)The truncation strategy to use for the thread. final Run.TruncationStrategy.Buildertype(JsonField<Run.TruncationStrategy.Type> type)The truncation strategy to use for the thread. final Run.TruncationStrategy.BuilderlastMessages(Long lastMessages)The number of most recent messages from the thread when constructing the context for the run. final Run.TruncationStrategy.BuilderlastMessages(Long lastMessages)The number of most recent messages from the thread when constructing the context for the run. final Run.TruncationStrategy.BuilderlastMessages(Optional<Long> lastMessages)The number of most recent messages from the thread when constructing the context for the run. final Run.TruncationStrategy.BuilderlastMessages(JsonField<Long> lastMessages)The number of most recent messages from the thread when constructing the context for the run. final Run.TruncationStrategy.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Run.TruncationStrategy.BuilderputAdditionalProperty(String key, JsonValue value)final Run.TruncationStrategy.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Run.TruncationStrategy.BuilderremoveAdditionalProperty(String key)final Run.TruncationStrategy.BuilderremoveAllAdditionalProperties(Set<String> keys)final Run.TruncationStrategybuild()-
-
Method Detail
-
type
final Run.TruncationStrategy.Builder type(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.
-
type
final Run.TruncationStrategy.Builder type(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 Run.TruncationStrategy.Builder lastMessages(Long lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
lastMessages
final Run.TruncationStrategy.Builder lastMessages(Long lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
lastMessages
final Run.TruncationStrategy.Builder lastMessages(Optional<Long> lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
lastMessages
final Run.TruncationStrategy.Builder lastMessages(JsonField<Long> lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
additionalProperties
final Run.TruncationStrategy.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Run.TruncationStrategy.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Run.TruncationStrategy.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Run.TruncationStrategy.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Run.TruncationStrategy.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final Run.TruncationStrategy build()
-
-
-
-