Package com.knuddels.jtokkit.api
Enum Class ModelType
- All Implemented Interfaces:
Serializable,Comparable<ModelType>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionReturns aModelTypefor the given name, orOptional.empty()if no such model type exists.Returns the encoding type that is used by this model type.intReturns the maximum context length that is supported by this model type.getName()Returns the name of the model type as used by the OpenAI API.static ModelTypeReturns the enum constant of this class with the specified name.static ModelType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GPT_4
-
GPT_4_32K
-
GPT_3_5_TURBO
-
GPT_3_5_TURBO_16K
-
TEXT_DAVINCI_003
-
TEXT_DAVINCI_002
-
TEXT_DAVINCI_001
-
TEXT_CURIE_001
-
TEXT_BABBAGE_001
-
TEXT_ADA_001
-
DAVINCI
-
CURIE
-
BABBAGE
-
ADA
-
CODE_DAVINCI_002
-
CODE_DAVINCI_001
-
CODE_CUSHMAN_002
-
CODE_CUSHMAN_001
-
DAVINCI_CODEX
-
CUSHMAN_CODEX
-
TEXT_DAVINCI_EDIT_001
-
CODE_DAVINCI_EDIT_001
-
TEXT_EMBEDDING_ADA_002
-
TEXT_EMBEDDING_3_SMALL
-
TEXT_EMBEDDING_3_LARGE
-
TEXT_SIMILARITY_DAVINCI_001
-
TEXT_SIMILARITY_CURIE_001
-
TEXT_SIMILARITY_BABBAGE_001
-
TEXT_SIMILARITY_ADA_001
-
TEXT_SEARCH_DAVINCI_DOC_001
-
TEXT_SEARCH_CURIE_DOC_001
-
TEXT_SEARCH_BABBAGE_DOC_001
-
TEXT_SEARCH_ADA_DOC_001
-
CODE_SEARCH_BABBAGE_CODE_001
-
CODE_SEARCH_ADA_CODE_001
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getName
Returns the name of the model type as used by the OpenAI API.- Returns:
- the name of the model type
-
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
Returns aModelTypefor the given name, orOptional.empty()if no such model type exists.- Parameters:
name- the name of the model type- Returns:
- the model type or
Optional.empty()
-