TruncationStrategy Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T> - com.
azure. ai. agents. persistent. models. TruncationStrategy
- com.
- com.
public final class TruncationStrategy
extends ExpandableStringEnum<TruncationStrategy>
Possible truncation strategies for the thread.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
static final
Truncation |
AUTO
Default value. |
|
static final
Truncation |
LAST_MESSAGES
The thread will truncate to the `last |
Constructor Summary
| Constructor | Description |
|---|---|
| TruncationStrategy() |
Deprecated
Use the fromString(String name) factory method.
Creates a new instance of Truncation |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Truncation |
fromString(String name)
Creates or finds a Truncation |
|
static
Collection<Truncation |
values()
Gets known Truncation |
Methods inherited from ExpandableStringEnum
Methods inherited from java.lang.Object
Field Details
AUTO
public static final TruncationStrategy AUTO
Default value. Messages in the middle of the thread will be dropped to fit the context length of the model.
LAST_MESSAGES
public static final TruncationStrategy LAST_MESSAGES
The thread will truncate to the `lastMessages` count of recent messages.
Constructor Details
TruncationStrategy
@Deprecated
public TruncationStrategy()
Deprecated
Creates a new instance of TruncationStrategy value.
Method Details
fromString
public static TruncationStrategy fromString(String name)
Creates or finds a TruncationStrategy from its string representation.
Parameters:
Returns:
values
public static Collection<TruncationStrategy> values()
Gets known TruncationStrategy values.
Returns: