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.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionLlamaChatRequest
(String prompt, Double temperature, Double topP, Integer maxGenLen) Creates an instance of aLlamaChatRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionCreate a new LlamaChatRequest builder.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxGenLen
record component.prompt()
Returns the value of theprompt
record component.Returns the value of thetemperature
record component.topP()
Returns the value of thetopP
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LlamaChatRequest
Creates an instance of aLlamaChatRequest
record class.- Parameters:
prompt
- the value for theprompt
record componenttemperature
- the value for thetemperature
record componenttopP
- the value for thetopP
record componentmaxGenLen
- the value for themaxGenLen
record component
-
-
Method Details
-
builder
Create a new LlamaChatRequest builder.- Parameters:
prompt
- compulsory prompt parameter.- Returns:
- a new LlamaChatRequest builder.
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
prompt
Returns the value of theprompt
record component.- Returns:
- the value of the
prompt
record component
-
temperature
Returns the value of thetemperature
record component.- Returns:
- the value of the
temperature
record component
-
topP
Returns the value of thetopP
record component.- Returns:
- the value of the
topP
record component
-
maxGenLen
Returns the value of themaxGenLen
record component.- Returns:
- the value of the
maxGenLen
record component
-