Uses of Class
dev.langchain4j.model.anthropic.AnthropicChatModel.AnthropicChatModelBuilder
Packages that use AnthropicChatModel.AnthropicChatModelBuilder
-
Uses of AnthropicChatModel.AnthropicChatModelBuilder in dev.langchain4j.model.anthropic
Methods in dev.langchain4j.model.anthropic that return AnthropicChatModel.AnthropicChatModelBuilderModifier and TypeMethodDescriptionSets the Anthropic API key used to authenticate requests.Sets the base URL of the Anthropic API.Sets the value of theanthropic-betarequest header to opt into beta features.AnthropicChatModel.builder()AnthropicChatModel.AnthropicChatModelBuilder.cacheSystemMessages(Boolean cacheSystemMessages) Enables prompt caching forSystemMessages.AnthropicChatModel.AnthropicChatModelBuilder.cacheTools(Boolean cacheTools) Enables prompt caching forToolSpecifications.AnthropicChatModel.AnthropicChatModelBuilder.customHeaders(Supplier<Map<String, String>> customHeadersSupplier) Sets a supplier of extra HTTP headers to include in every request to the Anthropic API.AnthropicChatModel.AnthropicChatModelBuilder.customHeaders(Map<String, String> customHeaders) Sets extra HTTP headers to include in every request to the Anthropic API.AnthropicChatModel.AnthropicChatModelBuilder.customParameters(Map<String, Object> customParameters) Sets arbitrary extra parameters to include in the Anthropic API request body.AnthropicChatModel.AnthropicChatModelBuilder.defaultRequestParameters(ChatRequestParameters parameters) Sets defaultChatRequestParametersthat are merged into every request.AnthropicChatModel.AnthropicChatModelBuilder.disableParallelToolUse(Boolean disableParallelToolUse) When set totrue, prevents the model from calling multiple tools in a single response turn.AnthropicChatModel.AnthropicChatModelBuilder.httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets a customHttpClientBuilderfor the underlying HTTP client.AnthropicChatModel.AnthropicChatModelBuilder.listeners(ChatModelListener... listeners) Sets theChatModelListeners to be notified on each request and response.AnthropicChatModel.AnthropicChatModelBuilder.listeners(List<ChatModelListener> listeners) Sets the list ofChatModelListeners to be notified on each request and response.AnthropicChatModel.AnthropicChatModelBuilder.logger(org.slf4j.Logger logger) AnthropicChatModel.AnthropicChatModelBuilder.logRequests(Boolean logRequests) Enables debug logging of HTTP request bodies sent to the Anthropic API.AnthropicChatModel.AnthropicChatModelBuilder.logResponses(Boolean logResponses) Enables debug logging of HTTP response bodies received from the Anthropic API.AnthropicChatModel.AnthropicChatModelBuilder.maxRetries(Integer maxRetries) Sets the number of times to retry a request on transient errors (e.g. rate limits, server errors).Sets the maximum number of tokens to generate in the response.AnthropicChatModel.AnthropicChatModelBuilder.modelName(AnthropicChatModelName modelName) Sets the model to use for chat completions using a type-safe enum constant.Sets the model to use for chat completions, specified as a string model ID.AnthropicChatModel.AnthropicChatModelBuilder.responseFormat(ResponseFormat responseFormat) Sets the response format, enabling structured output such as JSON mode.AnthropicChatModel.AnthropicChatModelBuilder.returnServerToolResults(Boolean returnServerToolResults) Controls whether to return server tool results (e.g., web_search, code_execution) insideAiMessage.attributes()under the key "server_tool_results".AnthropicChatModel.AnthropicChatModelBuilder.returnThinking(Boolean returnThinking) Controls whether to return thinking/reasoning text (if available) insideAiMessage.thinking().AnthropicChatModel.AnthropicChatModelBuilder.sendThinking(Boolean sendThinking) Controls whether to send thinking/reasoning text to the LLM in follow-up requests.AnthropicChatModel.AnthropicChatModelBuilder.serverTools(AnthropicServerTool... serverTools) Specifies server tools to be included in each request to the Anthropic API.AnthropicChatModel.AnthropicChatModelBuilder.serverTools(List<AnthropicServerTool> serverTools) Specifies server tools to be included in each request to the Anthropic API.AnthropicChatModel.AnthropicChatModelBuilder.stopSequences(List<String> stopSequences) Sets sequences that, when generated, will cause the model to stop generating further tokens.AnthropicChatModel.AnthropicChatModelBuilder.strictTools(Boolean strictTools) Enables strict JSON schema validation for tool input parameters.AnthropicChatModel.AnthropicChatModelBuilder.supportedCapabilities(Capability... supportedCapabilities) Declares the capabilities supported by the model (e.g.AnthropicChatModel.AnthropicChatModelBuilder.supportedCapabilities(Set<Capability> supportedCapabilities) Declares the capabilities supported by the model.AnthropicChatModel.AnthropicChatModelBuilder.temperature(Double temperature) Sets the sampling temperature in the range[0.0, 1.0].AnthropicChatModel.AnthropicChatModelBuilder.thinkingBudgetTokens(Integer thinkingBudgetTokens) Configures thinking.AnthropicChatModel.AnthropicChatModelBuilder.thinkingDisplay(String thinkingDisplay) Controls how thinking content is returned in the response.AnthropicChatModel.AnthropicChatModelBuilder.thinkingType(String thinkingType) Enables thinking.Sets the HTTP request timeout for calls to the Anthropic API.AnthropicChatModel.AnthropicChatModelBuilder.toolChoice(ToolChoice toolChoice) Controls how the model uses tools.AnthropicChatModel.AnthropicChatModelBuilder.toolChoiceName(String toolChoiceName) Sets the name of the specific tool the model must use whenToolChoiceis set toToolChoice.REQUIRED.AnthropicChatModel.AnthropicChatModelBuilder.toolMetadataKeysToSend(String... toolMetadataKeysToSend) Specifies metadata keys from theToolSpecification.metadata()to be included in the request.AnthropicChatModel.AnthropicChatModelBuilder.toolMetadataKeysToSend(Set<String> toolMetadataKeysToSend) Specifies metadata keys from theToolSpecification.metadata()to be included in the request.AnthropicChatModel.AnthropicChatModelBuilder.toolSpecifications(ToolSpecification... toolSpecifications) Sets the tools (functions) available to the model for function calling.AnthropicChatModel.AnthropicChatModelBuilder.toolSpecifications(List<ToolSpecification> toolSpecifications) Sets the list of tools (functions) available to the model for function calling.Sets the top-K sampling value.Sets the nucleus sampling probability (top-p) in the range(0.0, 1.0].Sets the user ID for the requests.Sets the value of theanthropic-versionrequest header.Constructors in dev.langchain4j.model.anthropic with parameters of type AnthropicChatModel.AnthropicChatModelBuilderModifierConstructorDescription