Class Model

  • All Implemented Interfaces:

    
    public final class Model
    
                        

    Describes an OpenAI model offering that can be used with the API.

    • Constructor Detail

    • Method Detail

      • id

         final String id()

        The model identifier, which can be referenced in the API endpoints.

      • created

         final Long created()

        The Unix timestamp (in seconds) when the model was created.

      • _object_

         final JsonValue _object_()

        The object type, which is always "model".

        Expected to always return the following:

        JsonValue.from("model")

        However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).

      • ownedBy

         final String ownedBy()

        The organization that owns the model.

      • _id

         final JsonField<String> _id()

        Returns the raw JSON value of id.

        Unlike id, this method doesn't throw if the JSON field has an unexpected type.

      • validate

         final Model validate()

        Validates that the types of all values in this object match their expected types recursively.

        This method is not forwards compatible with new types from the API for existing fields.

      • builder

         final static Model.Builder builder()

        Returns a mutable builder for constructing an instance of Model.

        The following fields are required:

        .id()
        .created()
        .ownedBy()