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 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.
      Use the fromString(String) factory method.
      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:
      name - a name to look for.
      Returns:
      the corresponding TruncationStrategy.
    • values

      public static Collection<TruncationStrategy> values()
      Gets known TruncationStrategy values.
      Returns:
      known TruncationStrategy values.