Record Class VendorModel

java.lang.Object
java.lang.Record
com.axelor.ai.provider.sync.VendorModel
Record Components:
id - the vendor's model id, stripped of any prefix — this is what AiModel.modelId holds and what dedup keys on
released - when the vendor says it appeared, or null when it does not say
reported - capabilities the vendor reported, under the same normalised keys a family's defaults uses (type, supportsTools, maxInputTokens, …). Empty for providers that return ids only. Translating vendor field names into these keys is the adapter's job, so that everything downstream stays vendor-agnostic.

public record VendorModel(String id, Instant released, Map<String,Object> reported) extends Record
One model as a provider's list endpoint reported it, normalised by its adapter.
  • Constructor Details

    • VendorModel

      public VendorModel(String id, Instant released, Map<String,Object> reported)
      Creates an instance of a VendorModel record class.
      Parameters:
      id - the value for the id record component
      released - the value for the released record component
      reported - the value for the reported record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • released

      public Instant released()
      Returns the value of the released record component.
      Returns:
      the value of the released record component
    • reported

      public Map<String,Object> reported()
      Returns the value of the reported record component.
      Returns:
      the value of the reported record component