Enum Class ModelType

java.lang.Object
java.lang.Enum<ModelType>
com.knuddels.jtokkit.api.ModelType
All Implemented Interfaces:
Serializable, Comparable<ModelType>, Constable

public enum ModelType extends Enum<ModelType>
  • Enum Constant Details

    • GPT_4

      public static final ModelType GPT_4
    • GPT_4_32K

      public static final ModelType GPT_4_32K
    • GPT_3_5_TURBO

      public static final ModelType GPT_3_5_TURBO
    • GPT_3_5_TURBO_16K

      public static final ModelType GPT_3_5_TURBO_16K
    • TEXT_DAVINCI_003

      public static final ModelType TEXT_DAVINCI_003
    • TEXT_DAVINCI_002

      public static final ModelType TEXT_DAVINCI_002
    • TEXT_DAVINCI_001

      public static final ModelType TEXT_DAVINCI_001
    • TEXT_CURIE_001

      public static final ModelType TEXT_CURIE_001
    • TEXT_BABBAGE_001

      public static final ModelType TEXT_BABBAGE_001
    • TEXT_ADA_001

      public static final ModelType TEXT_ADA_001
    • DAVINCI

      public static final ModelType DAVINCI
    • CURIE

      public static final ModelType CURIE
    • BABBAGE

      public static final ModelType BABBAGE
    • ADA

      public static final ModelType ADA
    • CODE_DAVINCI_002

      public static final ModelType CODE_DAVINCI_002
    • CODE_DAVINCI_001

      public static final ModelType CODE_DAVINCI_001
    • CODE_CUSHMAN_002

      public static final ModelType CODE_CUSHMAN_002
    • CODE_CUSHMAN_001

      public static final ModelType CODE_CUSHMAN_001
    • DAVINCI_CODEX

      public static final ModelType DAVINCI_CODEX
    • CUSHMAN_CODEX

      public static final ModelType CUSHMAN_CODEX
    • TEXT_DAVINCI_EDIT_001

      public static final ModelType TEXT_DAVINCI_EDIT_001
    • CODE_DAVINCI_EDIT_001

      public static final ModelType CODE_DAVINCI_EDIT_001
    • TEXT_EMBEDDING_ADA_002

      public static final ModelType TEXT_EMBEDDING_ADA_002
    • TEXT_EMBEDDING_3_SMALL

      public static final ModelType TEXT_EMBEDDING_3_SMALL
    • TEXT_EMBEDDING_3_LARGE

      public static final ModelType TEXT_EMBEDDING_3_LARGE
    • TEXT_SIMILARITY_DAVINCI_001

      public static final ModelType TEXT_SIMILARITY_DAVINCI_001
    • TEXT_SIMILARITY_CURIE_001

      public static final ModelType TEXT_SIMILARITY_CURIE_001
    • TEXT_SIMILARITY_BABBAGE_001

      public static final ModelType TEXT_SIMILARITY_BABBAGE_001
    • TEXT_SIMILARITY_ADA_001

      public static final ModelType TEXT_SIMILARITY_ADA_001
    • TEXT_SEARCH_DAVINCI_DOC_001

      public static final ModelType TEXT_SEARCH_DAVINCI_DOC_001
    • TEXT_SEARCH_CURIE_DOC_001

      public static final ModelType TEXT_SEARCH_CURIE_DOC_001
    • TEXT_SEARCH_BABBAGE_DOC_001

      public static final ModelType TEXT_SEARCH_BABBAGE_DOC_001
    • TEXT_SEARCH_ADA_DOC_001

      public static final ModelType TEXT_SEARCH_ADA_DOC_001
    • CODE_SEARCH_BABBAGE_CODE_001

      public static final ModelType CODE_SEARCH_BABBAGE_CODE_001
    • CODE_SEARCH_ADA_CODE_001

      public static final ModelType CODE_SEARCH_ADA_CODE_001
  • Method Details

    • values

      public static ModelType[] 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 ModelType 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
    • getName

      public String getName()
      Returns the name of the model type as used by the OpenAI API.
      Returns:
      the name of the model type
    • getEncodingType

      public EncodingType getEncodingType()
      Returns the encoding type that is used by this model type.
      Returns:
      the encoding type
    • getMaxContextLength

      public int getMaxContextLength()
      Returns the maximum context length that is supported by this model type. Note that the maximum context length consists of the amount of prompt tokens and the amount of completion tokens (where applicable).
      Returns:
      the maximum context length for this model type
    • fromName

      public static Optional<ModelType> fromName(String name)
      Returns a ModelType for the given name, or Optional.empty() if no such model type exists.
      Parameters:
      name - the name of the model type
      Returns:
      the model type or Optional.empty()