Class WatsonxChatRequestParameters
java.lang.Object
dev.langchain4j.model.chat.request.DefaultChatRequestParameters
dev.langchain4j.model.watsonx.WatsonxChatRequestParameters
- All Implemented Interfaces:
ChatRequestParameters
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newChatRequestParametersby combining the current parameters with the specified ones.booleaninthashCode()Deprecated, for removal: This API element is subject to removal in a future version.the watsonx.ai chat API does not support a length penalty, and there is no replacement.logprobs()com.ibm.watsonx.ai.chat.ChatModerationCreates a newChatRequestParametersby combining the current parameters with the specified ones.Deprecated, for removal: This API element is subject to removal in a future version.the watsonx.ai chat API does not support a repetition penalty.seed()spaceId()com.ibm.watsonx.ai.chat.model.Thinkingthinking()timeout()toString()Methods inherited from class DefaultChatRequestParameters
frequencyPenalty, maxOutputTokens, modelName, presencePenalty, responseFormat, stopSequences, temperature, toolChoice, toolSpecifications, topK, topP
-
Field Details
-
EMPTY
-
-
Method Details
-
logitBias
-
logprobs
-
topLogprobs
-
seed
-
toolChoiceName
-
timeout
-
projectId
-
spaceId
-
thinking
public com.ibm.watsonx.ai.chat.model.Thinking thinking() -
guidedChoice
-
guidedRegex
-
guidedGrammar
-
repetitionPenalty
Deprecated, for removal: This API element is subject to removal in a future version.the watsonx.ai chat API does not support a repetition penalty. UseDefaultChatRequestParameters.frequencyPenalty()orDefaultChatRequestParameters.presencePenalty()to discourage repetition. This method will be removed no earlier than 6 months after 1.24.0-beta34.- Returns:
- always
null: a non-null value is rejected when these parameters are built
-
lengthPenalty
Deprecated, for removal: This API element is subject to removal in a future version.the watsonx.ai chat API does not support a length penalty, and there is no replacement. This method will be removed no earlier than 6 months after 1.24.0-beta34.- Returns:
- always
null: a non-null value is rejected when these parameters are built
-
moderations
public com.ibm.watsonx.ai.chat.ChatModeration moderations() -
builder
-
overrideWith
Description copied from interface:ChatRequestParametersCreates a newChatRequestParametersby 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 specifiedChatRequestParametersobjects 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
- Specified by:
overrideWithin interfaceChatRequestParameters- Overrides:
overrideWithin classDefaultChatRequestParameters- Parameters:
that- the parameters whose values will override the current ones- Returns:
- a new
ChatRequestParametersinstance combining both sets of parameters
-
defaultedBy
Description copied from interface:ChatRequestParametersCreates a newChatRequestParametersby combining the current parameters with the specified ones. Values from the current parameters take precedence over values from the specified parameters when there is overlap. Neither the current nor the specifiedChatRequestParametersobjects are modified.Example:
Current parameters: temperature = 1.0 maxOutputTokens = 100 Specified parameters: temperature = 0.5 modelName = my-model Result: temperature = 1.0 // Preserved from current maxOutputTokens = 100 // Preserved from current modelName = my-model // Added from specified
- Specified by:
defaultedByin interfaceChatRequestParameters- Overrides:
defaultedByin classDefaultChatRequestParameters- Parameters:
that- the parameters whose values will be used as a default for the current ones- Returns:
- a new
ChatRequestParametersinstance combining both sets of parameters
-
equals
- Overrides:
equalsin classDefaultChatRequestParameters
-
hashCode
public int hashCode()- Overrides:
hashCodein classDefaultChatRequestParameters
-
toString
- Overrides:
toStringin classDefaultChatRequestParameters
-