Class BetaThreadRunCreateParams.TruncationStrategy.Builder
-
- All Implemented Interfaces:
public final class BetaThreadRunCreateParams.TruncationStrategy.Builder
A builder for TruncationStrategy.
-
-
Method Summary
-
-
Method Detail
-
type
final BetaThreadRunCreateParams.TruncationStrategy.Builder type(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
.
-
type
final BetaThreadRunCreateParams.TruncationStrategy.Builder type(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 BetaThreadRunCreateParams.TruncationStrategy.Builder lastMessages(Long lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
lastMessages
final BetaThreadRunCreateParams.TruncationStrategy.Builder lastMessages(Long lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
lastMessages
final BetaThreadRunCreateParams.TruncationStrategy.Builder lastMessages(Optional<Long> lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
lastMessages
final BetaThreadRunCreateParams.TruncationStrategy.Builder lastMessages(JsonField<Long> lastMessages)
The number of most recent messages from the thread when constructing the context for the run.
-
additionalProperties
final BetaThreadRunCreateParams.TruncationStrategy.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaThreadRunCreateParams.TruncationStrategy.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaThreadRunCreateParams.TruncationStrategy.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaThreadRunCreateParams.TruncationStrategy.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaThreadRunCreateParams.TruncationStrategy.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaThreadRunCreateParams.TruncationStrategy build()
-
-
-
-