Enum Class ModelType

java.lang.Object
java.lang.Enum<ModelType>
dev.langchain4j.model.catalog.ModelType
All Implemented Interfaces:
Serializable, Comparable<ModelType>, Constable

@Experimental public enum ModelType extends Enum<ModelType>
Represents the type/category of a model.
Since:
1.10.0
  • Enum Constant Details

    • CHAT

      public static final ModelType CHAT
      Chat/conversational models (e.g., GPT-5, Claude, etc.). Can be used with ChatModel or StreamingChatModel.
    • EMBEDDING

      public static final ModelType EMBEDDING
      Text embedding models for vector representations. Can be used with EmbeddingModel.
    • IMAGE_GENERATION

      public static final ModelType IMAGE_GENERATION
      Image generation models (e.g., DALL-E, Stable Diffusion). Can be used with ImageModel.
    • AUDIO_TRANSCRIPTION

      public static final ModelType AUDIO_TRANSCRIPTION
      Audio transcription models (speech-to-text). Can be used with AudioTranscriptionModel.
    • AUDIO_GENERATION

      public static final ModelType AUDIO_GENERATION
      Audio generation models (text-to-speech).
    • MODERATION

      public static final ModelType MODERATION
      Content moderation models. Can be used with ModerationModel.
    • SCORING

      public static final ModelType SCORING
      Document scoring or re-ranking models. Can be used with ScoringModel.
    • OTHER

      public static final ModelType OTHER
      Other or unclassified model types.
  • 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