Class LLMModelDetails

java.lang.Object
com.sap.ai.sdk.prompt.registry.model.LLMModelDetails

public class LLMModelDetails extends Object
The model and parameters to be used for the prompt templating. This is the model that will be used to generate the response.
  • Constructor Details

    • LLMModelDetails

      protected LLMModelDetails()
      Default constructor for LLMModelDetails.
  • Method Details

    • name

      @Nonnull public LLMModelDetails name(@Nonnull String name)
      Set the name of this LLMModelDetails instance and return the same instance.
      Parameters:
      name - Name of the model as in LLM Access configuration
      Returns:
      The same instance of this LLMModelDetails class
    • getName

      @Nonnull public String getName()
      Name of the model as in LLM Access configuration
      Returns:
      name The name of this LLMModelDetails instance.
    • setName

      public void setName(@Nonnull String name)
      Set the name of this LLMModelDetails instance.
      Parameters:
      name - Name of the model as in LLM Access configuration
    • version

      @Nonnull public LLMModelDetails version(@Nullable String version)
      Set the version of this LLMModelDetails instance and return the same instance.
      Parameters:
      version - Version of the model to be used
      Returns:
      The same instance of this LLMModelDetails class
    • getVersion

      @Nonnull public String getVersion()
      Version of the model to be used
      Returns:
      version The version of this LLMModelDetails instance.
    • setVersion

      public void setVersion(@Nullable String version)
      Set the version of this LLMModelDetails instance.
      Parameters:
      version - Version of the model to be used
    • params

      @Nonnull public LLMModelDetails params(@Nullable Map<String,Object> params)
      Set the params of this LLMModelDetails instance and return the same instance.
      Parameters:
      params - Additional parameters for the model. Default values are used for mandatory parameters.
      Returns:
      The same instance of this LLMModelDetails class
    • putparamsItem

      @Nonnull public LLMModelDetails putparamsItem(@Nonnull String key, @Nullable Object paramsItem)
      Put one params instance to this LLMModelDetails instance.
      Parameters:
      key - The String key of this params instance
      paramsItem - The params that should be added under the given key
      Returns:
      The same instance of type LLMModelDetails
    • getParams

      @Nonnull public Map<String,Object> getParams()
      Additional parameters for the model. Default values are used for mandatory parameters.
      Returns:
      params The params of this LLMModelDetails instance.
    • setParams

      public void setParams(@Nullable Map<String,Object> params)
      Set the params of this LLMModelDetails instance.
      Parameters:
      params - Additional parameters for the model. Default values are used for mandatory parameters.
    • timeout

      @Nonnull public LLMModelDetails timeout(@Nullable Integer timeout)
      Set the timeout of this LLMModelDetails instance and return the same instance.
      Parameters:
      timeout - Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models. Minimum: 1 Maximum: 600
      Returns:
      The same instance of this LLMModelDetails class
    • getTimeout

      @Nonnull public Integer getTimeout()
      Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models. minimum: 1 maximum: 600
      Returns:
      timeout The timeout of this LLMModelDetails instance.
    • setTimeout

      public void setTimeout(@Nullable Integer timeout)
      Set the timeout of this LLMModelDetails instance.
      Parameters:
      timeout - Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models. Minimum: 1 Maximum: 600
    • maxRetries

      @Nonnull public LLMModelDetails maxRetries(@Nullable Integer maxRetries)
      Set the maxRetries of this LLMModelDetails instance and return the same instance.
      Parameters:
      maxRetries - Maximum number of retries for the LLM request. This parameter is currently ignored for Vertex AI models. Minimum: 0 Maximum: 5
      Returns:
      The same instance of this LLMModelDetails class
    • getMaxRetries

      @Nonnull public Integer getMaxRetries()
      Maximum number of retries for the LLM request. This parameter is currently ignored for Vertex AI models. minimum: 0 maximum: 5
      Returns:
      maxRetries The maxRetries of this LLMModelDetails instance.
    • setMaxRetries

      public void setMaxRetries(@Nullable Integer maxRetries)
      Set the maxRetries of this LLMModelDetails instance.
      Parameters:
      maxRetries - Maximum number of retries for the LLM request. This parameter is currently ignored for Vertex AI models. Minimum: 0 Maximum: 5
    • getCustomFieldNames

      @Nonnull public Set<String> getCustomFieldNames()
      Get the names of the unrecognizable properties of the LLMModelDetails.
      Returns:
      The set of properties names
    • getCustomField

      @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
      Deprecated.
      Use toMap() instead.
      Get the value of an unrecognizable property of this LLMModelDetails instance.
      Parameters:
      name - The name of the property
      Returns:
      The value of the property
      Throws:
      NoSuchElementException - If no property with the given name could be found.
    • toMap

      @Nonnull public Map<String,Object> toMap()
      Get the value of all properties of this LLMModelDetails instance including unrecognized properties.
      Returns:
      The map of all properties
    • setCustomField

      public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
      Set an unrecognizable property of this LLMModelDetails instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      customFieldName - The name of the property
      customFieldValue - The value of the property
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • create

      public static LLMModelDetails.Builder create()
      Create a type-safe, fluent-api builder object to construct a new LLMModelDetails instance with all required arguments.