Enum Candidate.FinishReason

java.lang.Object
java.lang.Enum<Candidate.FinishReason>
com.google.cloud.aiplatform.v1.Candidate.FinishReason
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<Candidate.FinishReason>
Enclosing class:
Candidate

public static enum Candidate.FinishReason extends Enum<Candidate.FinishReason> implements com.google.protobuf.ProtocolMessageEnum
 The reason why the model stopped generating tokens.
 If empty, the model has not stopped generating the tokens.
 
Protobuf enum google.cloud.aiplatform.v1.Candidate.FinishReason
  • Enum Constant Details

    • FINISH_REASON_UNSPECIFIED

      public static final Candidate.FinishReason FINISH_REASON_UNSPECIFIED
       The finish reason is unspecified.
       
      FINISH_REASON_UNSPECIFIED = 0;
    • STOP

      public static final Candidate.FinishReason STOP
       Token generation reached a natural stopping point or a configured stop
       sequence.
       
      STOP = 1;
    • MAX_TOKENS

      public static final Candidate.FinishReason MAX_TOKENS
       Token generation reached the configured maximum output tokens.
       
      MAX_TOKENS = 2;
    • SAFETY

      public static final Candidate.FinishReason SAFETY
       Token generation stopped because the content potentially contains safety
       violations. NOTE: When streaming,
       [content][google.cloud.aiplatform.v1.Candidate.content] is empty if
       content filters blocks the output.
       
      SAFETY = 3;
    • RECITATION

      public static final Candidate.FinishReason RECITATION
       Token generation stopped because the content potentially contains
       copyright violations.
       
      RECITATION = 4;
    • OTHER

      public static final Candidate.FinishReason OTHER
       All other reasons that stopped the token generation.
       
      OTHER = 5;
    • BLOCKLIST

      public static final Candidate.FinishReason BLOCKLIST
       Token generation stopped because the content contains forbidden terms.
       
      BLOCKLIST = 6;
    • PROHIBITED_CONTENT

      public static final Candidate.FinishReason PROHIBITED_CONTENT
       Token generation stopped for potentially containing prohibited content.
       
      PROHIBITED_CONTENT = 7;
    • SPII

      public static final Candidate.FinishReason SPII
       Token generation stopped because the content potentially contains
       Sensitive Personally Identifiable Information (SPII).
       
      SPII = 8;
    • MALFORMED_FUNCTION_CALL

      public static final Candidate.FinishReason MALFORMED_FUNCTION_CALL
       The function call generated by the model is invalid.
       
      MALFORMED_FUNCTION_CALL = 9;
    • MODEL_ARMOR

      public static final Candidate.FinishReason MODEL_ARMOR
       The model response was blocked by Model Armor.
       
      MODEL_ARMOR = 10;
    • UNRECOGNIZED

      public static final Candidate.FinishReason UNRECOGNIZED
  • Field Details

    • FINISH_REASON_UNSPECIFIED_VALUE

      public static final int FINISH_REASON_UNSPECIFIED_VALUE
       The finish reason is unspecified.
       
      FINISH_REASON_UNSPECIFIED = 0;
      See Also:
    • STOP_VALUE

      public static final int STOP_VALUE
       Token generation reached a natural stopping point or a configured stop
       sequence.
       
      STOP = 1;
      See Also:
    • MAX_TOKENS_VALUE

      public static final int MAX_TOKENS_VALUE
       Token generation reached the configured maximum output tokens.
       
      MAX_TOKENS = 2;
      See Also:
    • SAFETY_VALUE

      public static final int SAFETY_VALUE
       Token generation stopped because the content potentially contains safety
       violations. NOTE: When streaming,
       [content][google.cloud.aiplatform.v1.Candidate.content] is empty if
       content filters blocks the output.
       
      SAFETY = 3;
      See Also:
    • RECITATION_VALUE

      public static final int RECITATION_VALUE
       Token generation stopped because the content potentially contains
       copyright violations.
       
      RECITATION = 4;
      See Also:
    • OTHER_VALUE

      public static final int OTHER_VALUE
       All other reasons that stopped the token generation.
       
      OTHER = 5;
      See Also:
    • BLOCKLIST_VALUE

      public static final int BLOCKLIST_VALUE
       Token generation stopped because the content contains forbidden terms.
       
      BLOCKLIST = 6;
      See Also:
    • PROHIBITED_CONTENT_VALUE

      public static final int PROHIBITED_CONTENT_VALUE
       Token generation stopped for potentially containing prohibited content.
       
      PROHIBITED_CONTENT = 7;
      See Also:
    • SPII_VALUE

      public static final int SPII_VALUE
       Token generation stopped because the content potentially contains
       Sensitive Personally Identifiable Information (SPII).
       
      SPII = 8;
      See Also:
    • MALFORMED_FUNCTION_CALL_VALUE

      public static final int MALFORMED_FUNCTION_CALL_VALUE
       The function call generated by the model is invalid.
       
      MALFORMED_FUNCTION_CALL = 9;
      See Also:
    • MODEL_ARMOR_VALUE

      public static final int MODEL_ARMOR_VALUE
       The model response was blocked by Model Armor.
       
      MODEL_ARMOR = 10;
      See Also:
  • Method Details

    • values

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

      public static Candidate.FinishReason valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

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

      public static Candidate.FinishReason forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<Candidate.FinishReason> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

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