Class Model

java.lang.Object
nl.dannyj.mistral.models.model.Model

public class Model extends Object
Represents a model available in the Mistral AI API.
  • Constructor Details

    • Model

      public Model()
    • Model

      public Model(String id, String object, long created, String ownedBy, ModelCapabilities capabilities, String name, String description, Integer maxContextLength, List<String> aliases, OffsetDateTime deprecation, Double defaultModelTemperature, String type, String job, String root, Boolean archived)
      Creates a new Model instance.
      Parameters:
      id - The ID of the model. Should be used to refer to the model in other API calls.
      object - The object type, which is always "model".
      created - Creation time of the model in seconds since the Unix epoch.
      ownedBy - Owner of the model. Defaults to "mistralai".
      capabilities - The capabilities of the model.
      name - The name of the model. Can be null.
      description - The description of the model. Can be null.
      maxContextLength - The maximum context length supported by the model. Defaults to 32768.
      aliases - A list of aliases for the model. Defaults to an empty list.
      deprecation - The deprecation date and time for the model. Can be null.
      defaultModelTemperature - The default sampling temperature for the model. Can be null.
      type - The type of the model, e.g., "base" or "fine-tuned".
      job - The ID of the fine-tuning job that created this model. Only present for fine-tuned models.
      root - The root model ID from which this fine-tuned model was derived. Only present for fine-tuned models.
      archived - Indicates if the fine-tuned model is archived. Defaults to false. Only present for fine-tuned models.
  • Method Details

    • getId

      public String getId()
      The ID of the model. Should be used to refer to the model in other API calls.
      Returns:
      The ID of the model.
    • getObject

      public String getObject()
      The object type, which is always "model".
      Returns:
      The object type.
    • getCreated

      public long getCreated()
      Creation time of the model in seconds since the Unix epoch.
      Returns:
      The creation time of the model in seconds since the Unix epoch.
    • getOwnedBy

      public String getOwnedBy()
      Owner of the model. Defaults to "mistralai".
      Returns:
      The owner of the model.
    • getCapabilities

      public ModelCapabilities getCapabilities()
      The capabilities of the model.
      Returns:
      The model capabilities.
    • getName

      public String getName()
      The name of the model. Can be null.
      Returns:
      The name of the model.
    • getDescription

      public String getDescription()
      The description of the model. Can be null.
      Returns:
      The description of the model.
    • getMaxContextLength

      public Integer getMaxContextLength()
      The maximum context length supported by the model. Defaults to 32768.
      Returns:
      The maximum context length.
    • getAliases

      public List<String> getAliases()
      A list of aliases for the model. Defaults to an empty list.
      Returns:
      The list of aliases.
    • getDeprecation

      public OffsetDateTime getDeprecation()
      The deprecation date and time for the model. Can be null.
      Returns:
      The deprecation date and time.
    • getDefaultModelTemperature

      public Double getDefaultModelTemperature()
      The default sampling temperature for the model. Can be null.
      Returns:
      The default model temperature.
    • getType

      public String getType()
      The type of the model, e.g., "base" or "fine-tuned".
      Returns:
      The type of the model.
    • getJob

      public String getJob()
      The ID of the fine-tuning job that created this model. Only present for fine-tuned models.
      Returns:
      The job ID.
    • getRoot

      public String getRoot()
      The root model ID from which this fine-tuned model was derived. Only present for fine-tuned models.
      Returns:
      The root model ID.
    • getArchived

      public Boolean getArchived()
      Indicates if the fine-tuned model is archived. Defaults to false. Only present for fine-tuned models.
      Returns:
      True if the model is archived, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object