Class DefaultChatRequestParameters
-
- All Implemented Interfaces:
-
dev.langchain4j.model.chat.request.ChatRequestParameters
public class DefaultChatRequestParameters implements ChatRequestParameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDefaultChatRequestParameters.Builder
-
Method Summary
Modifier and Type Method Description StringmodelName()Doubletemperature()DoubletopP()IntegertopK()DoublefrequencyPenalty()DoublepresencePenalty()IntegermaxOutputTokens()List<String>stopSequences()List<ToolSpecification>toolSpecifications()ToolChoicetoolChoice()ResponseFormatresponseFormat()ChatRequestParametersoverrideWith(ChatRequestParameters that)Creates a new ChatRequestParameters by combining the current parameters with the specified ones. booleanequals(Object o)inthashCode()StringtoString()static DefaultChatRequestParameters.Builder<out Object>builder()-
-
Method Detail
-
temperature
Double temperature()
-
frequencyPenalty
Double frequencyPenalty()
-
presencePenalty
Double presencePenalty()
-
maxOutputTokens
Integer maxOutputTokens()
-
stopSequences
List<String> stopSequences()
-
toolSpecifications
List<ToolSpecification> toolSpecifications()
-
toolChoice
ToolChoice toolChoice()
-
responseFormat
ResponseFormat responseFormat()
-
overrideWith
ChatRequestParameters overrideWith(ChatRequestParameters that)
Creates a new ChatRequestParameters by combining the current parameters with the specified ones. Values from the specified parameters override values from the current parameters when there is overlap. Neither the current nor the specified ChatRequestParameters objects are modified.
Example:
Current parameters: temperature = 1.0 maxOutputTokens = 100 Specified parameters: temperature = 0.5 modelName = my-model Result: temperature = 0.5 // Overridden from specified maxOutputTokens = 100 // Preserved from current modelName = my-model // Added from specified- Returns:
a new ChatRequestParameters instance combining both sets of parameters
-
hashCode
int hashCode()
-
builder
static DefaultChatRequestParameters.Builder<out Object> builder()
-
-
-
-