Class WatsonxChatRequestParameters.Builder
java.lang.Object
dev.langchain4j.model.chat.request.DefaultChatRequestParameters.Builder<WatsonxChatRequestParameters.Builder>
dev.langchain4j.model.watsonx.WatsonxChatRequestParameters.Builder
- Enclosing class:
WatsonxChatRequestParameters
public static class WatsonxChatRequestParameters.Builder
extends DefaultChatRequestParameters.Builder<WatsonxChatRequestParameters.Builder>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()guidedChoice(String... guidedChoice) guidedChoice(Set<String> guidedChoices) guidedGrammar(String guidedGrammar) guidedRegex(String guidedRegex) lengthPenalty(Double lengthPenalty) Deprecated, for removal: This API element is subject to removal in a future version.moderations(com.ibm.watsonx.ai.chat.ChatModeration moderations) overrideWith(ChatRequestParameters parameters) repetitionPenalty(Double 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, so a non-null value makesbuild()throw anUnsupportedFeatureException.thinking(boolean enabled) thinking(com.ibm.watsonx.ai.chat.model.ExtractionTags tags) thinking(com.ibm.watsonx.ai.chat.model.Thinking thinking) thinking(com.ibm.watsonx.ai.chat.model.ThinkingEffort thinkingEffort) toolChoiceName(String toolChoiceName) topLogprobs(Integer topLogprobs) Methods inherited from class DefaultChatRequestParameters.Builder
frequencyPenalty, maxOutputTokens, modelName, presencePenalty, responseFormat, responseFormat, stopSequences, stopSequences, temperature, toolChoice, toolSpecifications, toolSpecifications, topK, topP
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
overrideWith
- Overrides:
overrideWithin classDefaultChatRequestParameters.Builder<WatsonxChatRequestParameters.Builder>
-
logitBias
-
logprobs
-
topLogprobs
-
seed
-
toolChoiceName
-
timeout
-
projectId
-
spaceId
-
thinking
-
thinking
public WatsonxChatRequestParameters.Builder thinking(com.ibm.watsonx.ai.chat.model.ExtractionTags tags) -
thinking
public WatsonxChatRequestParameters.Builder thinking(com.ibm.watsonx.ai.chat.model.ThinkingEffort thinkingEffort) -
thinking
public WatsonxChatRequestParameters.Builder thinking(com.ibm.watsonx.ai.chat.model.Thinking thinking) -
guidedChoice
-
guidedChoice
-
guidedRegex
-
guidedGrammar
-
repetitionPenalty
@Deprecated(since="1.24.0-beta34", forRemoval=true) public WatsonxChatRequestParameters.Builder repetitionPenalty(Double 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, so a non-null value makesbuild()throw anUnsupportedFeatureException. UseDefaultChatRequestParameters.Builder.frequencyPenalty(Double)orDefaultChatRequestParameters.Builder.presencePenalty(Double)to discourage repetition. This method will be removed no earlier than 6 months after 1.24.0-beta34.- Parameters:
repetitionPenalty- must benull- Returns:
this
-
lengthPenalty
@Deprecated(since="1.24.0-beta34", forRemoval=true) public WatsonxChatRequestParameters.Builder lengthPenalty(Double 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, so a non-null value makesbuild()throw anUnsupportedFeatureException. There is no replacement. This method will be removed no earlier than 6 months after 1.24.0-beta34.- Parameters:
lengthPenalty- must benull- Returns:
this
-
moderations
public WatsonxChatRequestParameters.Builder moderations(com.ibm.watsonx.ai.chat.ChatModeration moderations) -
build
- Overrides:
buildin classDefaultChatRequestParameters.Builder<WatsonxChatRequestParameters.Builder>
-
build()throw anUnsupportedFeatureException.