Class WatsonxChatModel.Builder
java.lang.Object
dev.langchain4j.model.watsonx.WatsonxChatModel.Builder
- Enclosing class:
WatsonxChatModel
Builder class for constructing
WatsonxChatModel instances with configurable parameters.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionauthenticator(com.ibm.watsonx.ai.core.auth.Authenticator authenticator) baseUrl(com.ibm.watsonx.ai.CloudRegion baseUrl) build()defaultRequestParameters(dev.langchain4j.model.chat.request.ChatRequestParameters defaultRequestParameters) frequencyPenalty(Double frequencyPenalty) guidedChoice(String... guidedChoice) guidedChoice(Set<String> guidedChoices) guidedGrammar(String guidedGrammar) guidedRegex(String guidedRegex) httpClient(HttpClient httpClient) lengthPenalty(Double lengthPenalty) logRequests(Boolean logRequests) logResponses(Boolean logResponses) maxOutputTokens(Integer maxOutputTokens) presencePenalty(Double presencePenalty) repetitionPenalty(Double repetitionPenalty) responseFormat(dev.langchain4j.model.chat.request.ResponseFormat responseFormat) stopSequences(String... stopSequences) stopSequences(List<String> stopSequences) supportedCapabilities(dev.langchain4j.model.chat.Capability... supportedCapabilities) supportedCapabilities(Set<dev.langchain4j.model.chat.Capability> supportedCapabilities) temperature(Double temperature) 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) toolChoice(dev.langchain4j.model.chat.request.ToolChoice toolChoice) toolChoiceName(String toolChoiceName) toolSpecifications(dev.langchain4j.agent.tool.ToolSpecification... toolSpecifications) toolSpecifications(List<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications) topLogprobs(Integer topLogprobs) verifySsl(boolean verifySsl)
-
Field Details
-
baseUrl
-
version
-
apiKey
-
projectId
-
spaceId
-
logRequests
-
logResponses
-
timeout
-
authenticator
protected com.ibm.watsonx.ai.core.auth.Authenticator authenticator -
httpClient
-
verifySsl
protected boolean verifySsl
-
-
Method Details
-
build
-
modelName
-
temperature
-
topP
-
frequencyPenalty
-
presencePenalty
-
maxOutputTokens
-
stopSequences
-
stopSequences
-
toolChoice
public WatsonxChatModel.Builder toolChoice(dev.langchain4j.model.chat.request.ToolChoice toolChoice) -
responseFormat
public WatsonxChatModel.Builder responseFormat(dev.langchain4j.model.chat.request.ResponseFormat responseFormat) -
logitBias
-
logprobs
-
topLogprobs
-
seed
-
toolChoiceName
-
supportedCapabilities
public WatsonxChatModel.Builder supportedCapabilities(Set<dev.langchain4j.model.chat.Capability> supportedCapabilities) -
supportedCapabilities
public WatsonxChatModel.Builder supportedCapabilities(dev.langchain4j.model.chat.Capability... supportedCapabilities) -
toolSpecifications
public WatsonxChatModel.Builder toolSpecifications(List<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications) -
toolSpecifications
public WatsonxChatModel.Builder toolSpecifications(dev.langchain4j.agent.tool.ToolSpecification... toolSpecifications) -
listeners
public WatsonxChatModel.Builder listeners(List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners) -
defaultRequestParameters
public WatsonxChatModel.Builder defaultRequestParameters(dev.langchain4j.model.chat.request.ChatRequestParameters defaultRequestParameters) -
thinking
-
thinking
-
thinking
public WatsonxChatModel.Builder thinking(com.ibm.watsonx.ai.chat.model.ThinkingEffort thinkingEffort) -
thinking
-
guidedChoice
-
guidedChoice
-
guidedRegex
-
guidedGrammar
-
repetitionPenalty
-
lengthPenalty
-
baseUrl
-
baseUrl
-
baseUrl
-
version
-
projectId
-
spaceId
-
apiKey
-
logRequests
-
logResponses
-
timeout
-
authenticator
public WatsonxChatModel.Builder authenticator(com.ibm.watsonx.ai.core.auth.Authenticator authenticator) -
httpClient
-
verifySsl
-