Class AnthropicContent.Builder
java.lang.Object
dev.langchain4j.model.anthropic.internal.api.AnthropicContent.Builder
- Enclosing class:
AnthropicContent
Builder for constructing
AnthropicContent instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theAnthropicContentinstance.Sets the raw content for tool results.Sets the data for redacted thinking.Sets the unique identifier for tool use.Sets the tool input parameters.Sets the tool name.Sets the signature for thinking content.Sets the text content.Sets the thinking content.Sets the tool use ID for tool results.Sets the content type.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the content type.- Parameters:
type- the content type (e.g., "text", "tool_use", "thinking")- Returns:
- this builder for chaining
-
text
Sets the text content.- Parameters:
text- the text content- Returns:
- this builder for chaining
-
id
Sets the unique identifier for tool use.- Parameters:
id- the tool use identifier- Returns:
- this builder for chaining
-
name
Sets the tool name.- Parameters:
name- the tool name- Returns:
- this builder for chaining
-
input
Sets the tool input parameters.- Parameters:
input- the tool input parameters- Returns:
- this builder for chaining
-
thinking
Sets the thinking content.- Parameters:
thinking- the thinking content- Returns:
- this builder for chaining
-
signature
Sets the signature for thinking content.- Parameters:
signature- the thinking signature- Returns:
- this builder for chaining
-
data
Sets the data for redacted thinking.- Parameters:
data- the redacted thinking data- Returns:
- this builder for chaining
-
toolUseId
Sets the tool use ID for tool results.- Parameters:
toolUseId- the tool use ID- Returns:
- this builder for chaining
-
content
Sets the raw content for tool results.- Parameters:
content- the raw content- Returns:
- this builder for chaining
-
build
Builds theAnthropicContentinstance.- Returns:
- a new
AnthropicContentinstance
-