Class TruncationStrategy
java.lang.Object
com.azure.core.util.ExpandableStringEnum<TruncationStrategy>
com.azure.ai.openai.assistants.models.TruncationStrategy
- All Implemented Interfaces:
com.azure.core.util.ExpandableEnum<String>
public final class TruncationStrategy
extends com.azure.core.util.ExpandableStringEnum<TruncationStrategy>
Possible truncation strategies for the thread.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TruncationStrategy
Default value.static final TruncationStrategy
The thread will truncate to the `lastMessages` count of recent messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TruncationStrategy
fromString
(String name) Creates or finds a TruncationStrategy from its string representation.static Collection
<TruncationStrategy> values()
Gets known TruncationStrategy values.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, getValue, hashCode, toString, values
-
Field Details
-
AUTO
Default value. Messages in the middle of the thread will be dropped to fit the context length of the model. -
LAST_MESSAGES
The thread will truncate to the `lastMessages` count of recent messages.
-
-
Constructor Details
-
TruncationStrategy
Deprecated.Use thefromString(String)
factory method.Creates a new instance of TruncationStrategy value.
-
-
Method Details
-
fromString
Creates or finds a TruncationStrategy from its string representation.- Parameters:
name
- a name to look for.- Returns:
- the corresponding TruncationStrategy.
-
values
Gets known TruncationStrategy values.- Returns:
- known TruncationStrategy values.
-
fromString(String)
factory method.