Record Class VertexAiPaLm2Api.Model

java.lang.Object
java.lang.Record
org.springframework.ai.vertexai.palm2.api.VertexAiPaLm2Api.Model
Record Components:
name - The resource name of the Model. Format: `models/{model} with a {model} naming convention of:`
 {baseModelId}-{version}
 
baseModelId - The name of the base model, pass this to the generation request.
version - The version of the model. This represents the major version.
displayName - The human-readable name of the model. E.g. "Chat Bison". The name can be up to 128 characters long and can consist of any UTF-8 characters.
description - A short description of the model.
inputTokenLimit - Maximum number of input tokens allowed for this model.
outputTokenLimit - Maximum number of output tokens allowed for this model.
supportedGenerationMethods - List of supported generation methods for this model. The method names are defined as Pascal case strings, such as generateMessage which correspond to API methods.
temperature - Controls the randomness of the output. Values can range over [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied, while a value closer to 0.0 will typically result in less surprising responses from the model. This value specifies default to be used by the backend while making the call to the model.
topP - For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least topP. This value specifies default to be used by the backend while making the call to the model.
topK - For Top-k sampling. Top-k sampling considers the set of topK most probable tokens. This value specifies default to be used by the backend while making the call to the model.
Enclosing class:
VertexAiPaLm2Api

public static record VertexAiPaLm2Api.Model(String name, String baseModelId, String version, String displayName, String description, Integer inputTokenLimit, Integer outputTokenLimit, List<String> supportedGenerationMethods, Double temperature, Double topP, Integer topK) extends Record
Information about a Generative Language Model.
  • Constructor Details

    • Model

      public Model(String name, String baseModelId, String version, String displayName, String description, Integer inputTokenLimit, Integer outputTokenLimit, List<String> supportedGenerationMethods, Double temperature, Double topP, Integer topK)
      Creates an instance of a Model record class.
      Parameters:
      name - the value for the name record component
      baseModelId - the value for the baseModelId record component
      version - the value for the version record component
      displayName - the value for the displayName record component
      description - the value for the description record component
      inputTokenLimit - the value for the inputTokenLimit record component
      outputTokenLimit - the value for the outputTokenLimit record component
      supportedGenerationMethods - the value for the supportedGenerationMethods record component
      temperature - the value for the temperature record component
      topP - the value for the topP record component
      topK - the value for the topK 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • baseModelId

      public String baseModelId()
      Returns the value of the baseModelId record component.
      Returns:
      the value of the baseModelId record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • inputTokenLimit

      public Integer inputTokenLimit()
      Returns the value of the inputTokenLimit record component.
      Returns:
      the value of the inputTokenLimit record component
    • outputTokenLimit

      public Integer outputTokenLimit()
      Returns the value of the outputTokenLimit record component.
      Returns:
      the value of the outputTokenLimit record component
    • supportedGenerationMethods

      public List<String> supportedGenerationMethods()
      Returns the value of the supportedGenerationMethods record component.
      Returns:
      the value of the supportedGenerationMethods record component
    • temperature

      public Double temperature()
      Returns the value of the temperature record component.
      Returns:
      the value of the temperature record component
    • topP

      public Double topP()
      Returns the value of the topP record component.
      Returns:
      the value of the topP record component
    • topK

      public Integer topK()
      Returns the value of the topK record component.
      Returns:
      the value of the topK record component