Class AnthropicCountTokensRequest.Builder
java.lang.Object
dev.langchain4j.model.anthropic.internal.api.AnthropicCountTokensRequest.Builder
- Enclosing class:
AnthropicCountTokensRequest
Builder for constructing
AnthropicCountTokensRequest instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theAnthropicCountTokensRequestinstance.messages(List<AnthropicMessage> messages) Sets the list of messages.Sets the model name.system(List<AnthropicTextContent> system) Sets the system prompt content.thinking(AnthropicThinking thinking) Sets the thinking configuration.tools(List<AnthropicTool> tools) Sets the list of tools.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
model
Sets the model name.- Parameters:
model- the model name- Returns:
- this builder for chaining
-
messages
Sets the list of messages.- Parameters:
messages- the list of messages- Returns:
- this builder for chaining
-
system
Sets the system prompt content.- Parameters:
system- the system prompt content- Returns:
- this builder for chaining
-
tools
Sets the list of tools.- Parameters:
tools- the list of tools- Returns:
- this builder for chaining
-
thinking
Sets the thinking configuration.- Parameters:
thinking- the thinking configuration- Returns:
- this builder for chaining
-
build
Builds theAnthropicCountTokensRequestinstance.- Returns:
- a new
AnthropicCountTokensRequestinstance
-