Enum Class Completion.FinishReason

java.lang.Object
java.lang.Enum<Completion.FinishReason>
ai.vespa.llm.completion.Completion.FinishReason
All Implemented Interfaces:
Serializable, Comparable<Completion.FinishReason>, Constable
Enclosing class:
Completion

public static enum Completion.FinishReason extends Enum<Completion.FinishReason>
  • Enum Constant Details

    • length

      public static final Completion.FinishReason length
      The maximum length of a completion was reached.
    • stop

      public static final Completion.FinishReason stop
      The completion is the predicted ending of the prompt.
    • none

      public static final Completion.FinishReason none
      The completion is not finished yet, more tokens are incoming.
    • other

      public static final Completion.FinishReason other
      Other, may be encountered for models with specific stop tokens, e.g. 'eos' for deepseek.
    • error

      public static final Completion.FinishReason error
      An error occurred while generating the completion
    • discard

      public static final Completion.FinishReason discard
      The request for the completion was discarded without raising an error.
    • tool_calls

      public static final Completion.FinishReason tool_calls
      Model generated a completion with a tool call.
    • content_filter

      public static final Completion.FinishReason content_filter
      Model finished due to blocking by content filter.
    • function_call

      public static final Completion.FinishReason function_call
      Model finished with function call.
  • Method Details

    • values

      public static Completion.FinishReason[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Completion.FinishReason valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null