Uses of Class
dev.langchain4j.model.anthropic.AnthropicTokenCountEstimator.Builder
Packages that use AnthropicTokenCountEstimator.Builder
-
Uses of AnthropicTokenCountEstimator.Builder in dev.langchain4j.model.anthropic
Methods in dev.langchain4j.model.anthropic that return AnthropicTokenCountEstimator.BuilderModifier and TypeMethodDescriptionAnthropicTokenCountEstimator.Builder.addDummyUserMessageIfNoUserMessages()Configures the estimator to automatically insert a minimal dummy user message ("ping") when the provided messages contain only system messages or are empty.AnthropicTokenCountEstimator.Builder.addDummyUserMessageIfNoUserMessages(String dummyUserMessage) Configures the estimator to automatically insert a dummy user message with custom text when the provided messages contain only system messages or are empty.Sets 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.AnthropicTokenCountEstimator.builder()AnthropicTokenCountEstimator.Builder.httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets a customHttpClientBuilderfor the underlying HTTP client.AnthropicTokenCountEstimator.Builder.logRequests(Boolean logRequests) Enables debug logging of HTTP request bodies sent to the Anthropic API.AnthropicTokenCountEstimator.Builder.logResponses(Boolean logResponses) Enables debug logging of HTTP response bodies received from the Anthropic API.AnthropicTokenCountEstimator.Builder.modelName(AnthropicChatModelName modelName) Sets the model used for token count estimation using a type-safe enum constant.Sets the model used for token count estimation, specified as a string model ID.Sets the HTTP request timeout for calls to the Anthropic API.Sets the value of theanthropic-versionrequest header.Constructors in dev.langchain4j.model.anthropic with parameters of type AnthropicTokenCountEstimator.BuilderModifierConstructorDescription