Record Class LlamaChatBedrockApi.LlamaChatRequest

java.lang.Object
java.lang.Record
org.springframework.ai.bedrock.llama.api.LlamaChatBedrockApi.LlamaChatRequest
Record Components:
prompt - The prompt to use for the chat.
temperature - The temperature value controls the randomness of the generated text. Use a lower value to decrease randomness in the response.
topP - The topP value controls the diversity of the generated text. Use a lower value to ignore less probable options. Set to 0 or 1.0 to disable.
maxGenLen - The maximum length of the generated text.
Enclosing class:
LlamaChatBedrockApi

public static record LlamaChatBedrockApi.LlamaChatRequest(String prompt, Double temperature, Double topP, Integer maxGenLen) extends Record
LlamaChatRequest encapsulates the request parameters for the Meta Llama chat model.
  • Constructor Details

    • LlamaChatRequest

      public LlamaChatRequest(String prompt, Double temperature, Double topP, Integer maxGenLen)
      Creates an instance of a LlamaChatRequest record class.
      Parameters:
      prompt - the value for the prompt record component
      temperature - the value for the temperature record component
      topP - the value for the topP record component
      maxGenLen - the value for the maxGenLen record component
  • Method Details

    • builder

      public static LlamaChatBedrockApi.LlamaChatRequest.Builder builder(String prompt)
      Create a new LlamaChatRequest builder.
      Parameters:
      prompt - compulsory prompt parameter.
      Returns:
      a new LlamaChatRequest builder.
    • 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.
    • prompt

      public String prompt()
      Returns the value of the prompt record component.
      Returns:
      the value of the prompt 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
    • maxGenLen

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