Uses of Class
dev.langchain4j.model.anthropic.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder
Packages that use AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder
-
Uses of AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder in dev.langchain4j.model.anthropic
Methods in dev.langchain4j.model.anthropic that return AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilderModifier 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.AnthropicStreamingChatModel.builder()AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.cacheSystemMessages(Boolean cacheSystemMessages) Enables prompt caching forSystemMessages.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.cacheTools(Boolean cacheTools) Enables prompt caching forToolSpecifications.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.customHeaders(Supplier<Map<String, String>> customHeadersSupplier) Sets a supplier of extra HTTP headers to include in every request to the Anthropic API.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.customHeaders(Map<String, String> customHeaders) Sets extra HTTP headers to include in every request to the Anthropic API.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.customParameters(Map<String, Object> customParameters) Sets arbitrary extra parameters to include in the Anthropic API request body.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.disableParallelToolUse(Boolean disableParallelToolUse) When set totrue, prevents the model from calling multiple tools in a single response turn.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets a customHttpClientBuilderfor the underlying HTTP client.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.listeners(ChatModelListener... listeners) Sets theChatModelListeners to be notified on each request and response.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.listeners(List<ChatModelListener> listeners) Sets the list ofChatModelListeners to be notified on each request and response.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.logger(org.slf4j.Logger logger) AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.logRequests(Boolean logRequests) Enables debug logging of HTTP request bodies sent to the Anthropic API.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.logResponses(Boolean logResponses) Enables debug logging of HTTP response bodies (server-sent events) received from the Anthropic API.Sets the maximum number of tokens to generate in the response.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.modelName(AnthropicChatModelName modelName) Sets the model to use for streaming chat completions using a type-safe enum constant.Sets the model to use for streaming chat completions, specified as a string model ID.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.responseFormat(ResponseFormat responseFormat) Sets the response format, enabling structured output such as JSON mode.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.returnServerToolResults(Boolean returnServerToolResults) Controls whether to return server tool results (e.g., web_search, code_execution) insideAiMessage.attributes()under the key "server_tool_results".AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.returnThinking(Boolean returnThinking) Controls whether to return thinking/reasoning text (if available) insideAiMessage.thinking()and whether to invoke theStreamingChatResponseHandler.onPartialThinking(PartialThinking)callback.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.sendThinking(Boolean sendThinking) Controls whether to send thinking/reasoning text to the LLM in follow-up requests.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.serverTools(AnthropicServerTool... serverTools) Specifies server tools to be included in each request to the Anthropic API.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.serverTools(List<AnthropicServerTool> serverTools) Specifies server tools to be included in each request to the Anthropic API.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.stopSequences(List<String> stopSequences) Sets sequences that, when generated, will cause the model to stop generating further tokens.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.strictTools(Boolean strictTools) Enables strict JSON schema validation for tool input parameters.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.supportedCapabilities(Capability... supportedCapabilities) Declares the capabilities supported by the model (e.g.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.supportedCapabilities(Set<Capability> supportedCapabilities) Declares the capabilities supported by the model.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.temperature(Double temperature) Sets the sampling temperature in the range[0.0, 1.0].AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.thinkingBudgetTokens(Integer thinkingBudgetTokens) Configures thinking.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.thinkingDisplay(String thinkingDisplay) Controls how thinking content is returned in the response stream.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.thinkingType(String thinkingType) Enables thinking.Sets the HTTP request timeout for calls to the Anthropic streaming API.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.toolChoice(ToolChoice toolChoice) Controls how the model uses tools.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.toolChoiceName(String toolChoiceName) Sets the name of the specific tool the model must use whenToolChoiceis set toToolChoice.REQUIRED.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.toolMetadataKeysToSend(String... toolMetadataKeysToSend) Specifies metadata keys from theToolSpecification.metadata()to be included in the request.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.toolMetadataKeysToSend(Set<String> toolMetadataKeysToSend) Specifies metadata keys from theToolSpecification.metadata()to be included in the request.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.toolSpecifications(ToolSpecification... toolSpecifications) Sets the tools (functions) available to the model for function calling.AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.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 AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilderModifierConstructorDescriptionConstructs an instance of anAnthropicStreamingChatModelwith the specified parameters.