Class AnthropicCreateMessageResponse.Builder
java.lang.Object
dev.langchain4j.model.anthropic.internal.api.AnthropicCreateMessageResponse.Builder
- Enclosing class:
AnthropicCreateMessageResponse
Builder for constructing
AnthropicCreateMessageResponse instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theAnthropicCreateMessageResponseinstance.content(List<AnthropicContent> content) Sets the content blocks.Sets the unique identifier.Sets the model name.Sets the role.stopReason(String stopReason) Sets the stop reason.stopSequence(String stopSequence) Sets the stop sequence.Sets the response type.usage(AnthropicUsage usage) Sets the usage statistics.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Sets the unique identifier.- Parameters:
id- the message identifier- Returns:
- this builder for chaining
-
type
Sets the response type.- Parameters:
type- the response type- Returns:
- this builder for chaining
-
role
Sets the role.- Parameters:
role- the role- Returns:
- this builder for chaining
-
content
Sets the content blocks.- Parameters:
content- the content blocks- Returns:
- this builder for chaining
-
model
Sets the model name.- Parameters:
model- the model name- Returns:
- this builder for chaining
-
stopReason
Sets the stop reason.- Parameters:
stopReason- the stop reason- Returns:
- this builder for chaining
-
stopSequence
Sets the stop sequence.- Parameters:
stopSequence- the stop sequence- Returns:
- this builder for chaining
-
usage
Sets the usage statistics.- Parameters:
usage- the usage statistics- Returns:
- this builder for chaining
-
build
Builds theAnthropicCreateMessageResponseinstance.- Returns:
- a new
AnthropicCreateMessageResponseinstance
-