Model

public abstract class Model extends JsonSerializable

A trained machine learning model.

Constructors

Link copied to clipboard
public void Model()

Types

Link copied to clipboard
public abstract class Builder
Builder for Model.

Properties

Link copied to clipboard
public final static String MAX_READ_LENGTH_PROPERTY
System property to override the default max JSON string length (20MB) in read constraints.

Functions

Link copied to clipboard
public static Model.Builder builder()
Instantiates a builder for Model.
Link copied to clipboard
public abstract Optional<List<Checkpoint>> checkpoints()
The checkpoints of the model.
Link copied to clipboard
public abstract Optional<String> defaultCheckpointId()
The default checkpoint id of a model version.
Link copied to clipboard
public abstract Optional<String> description()
Description of the model.
Link copied to clipboard
public abstract Optional<String> displayName()
Display name of the model.
Link copied to clipboard
public abstract Optional<List<Endpoint>> endpoints()
List of deployed models created from this base model.
Link copied to clipboard
public static Model fromJson(String jsonString)
Deserializes a JSON string to a Model object.
Link copied to clipboard
@InternalApi()
public static T fromJsonNode<T extends JsonSerializable>(JsonNode jsonNode, Class<T> clazz)
Deserializes a JsonNode to an object of the given type.
Link copied to clipboard
@InternalApi()
public static T fromJsonString<T extends JsonSerializable>(String jsonString, Class<T> clazz)
Deserializes a Json string to an object of the given type.
Link copied to clipboard
public abstract Optional<Integer> inputTokenLimit()
The maximum number of input tokens that the model can handle.
Link copied to clipboard
public abstract Optional<Map<String, String>> labels()
Labels with user-defined metadata to organize your models.
Link copied to clipboard
public abstract Optional<Float> maxTemperature()
The maximum temperature value used for sampling set when the dataset was saved.
Link copied to clipboard
public abstract Optional<String> name()
Resource name of the model.
Link copied to clipboard
public static ObjectMapper objectMapper()
Link copied to clipboard
public abstract Optional<Integer> outputTokenLimit()
The maximum number of output tokens that the model can generate.
Link copied to clipboard
public static void setMaxReadLength(int maxReadLength)
Overrides the default maximum JSON string length (20MB) for the JSON parser.
Link copied to clipboard
public static JsonNode stringToJsonNode(String string)
Converts a Json string to a JsonNode.
Link copied to clipboard
public abstract Optional<List<String>> supportedActions()
List of actions that are supported by the model.
Link copied to clipboard
public abstract Optional<Float> temperature()
Temperature value used for sampling set when the dataset was saved.
Link copied to clipboard
public abstract Optional<Boolean> thinking()
Whether the model supports thinking features.
Link copied to clipboard
public abstract Model.Builder toBuilder()
Creates a builder with the same values as this instance.
Link copied to clipboard
public String toJson()
Serializes the instance to a Json string.
Link copied to clipboard
public static JsonNode toJsonNode(Object object)
Serializes an object to a JsonNode.
Link copied to clipboard
public static String toJsonString(Object object)
Serializes an object to a Json string.
Link copied to clipboard
public abstract Optional<Integer> topK()
Optional.
Link copied to clipboard
public abstract Optional<Float> topP()
Optional.
Link copied to clipboard
Information about the tuned model from the base model.
Link copied to clipboard
public abstract Optional<String> version()
Version ID of the model.