Class StreamHelper.ChatCompletionResponseBuilder
java.lang.Object
org.springframework.ai.anthropic.api.StreamHelper.ChatCompletionResponseBuilder
- Enclosing class:
- StreamHelper
Builder for
AnthropicApi.ChatCompletionResponse
. Used internally by StreamHelper
to aggregate stream events.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
withContent
(List<AnthropicApi.ContentBlock> content) withRole
(AnthropicApi.Role role) withStopReason
(String stopReason) withStopSequence
(String stopSequence) withUsage
(AnthropicApi.Usage usage)
-
Constructor Details
-
ChatCompletionResponseBuilder
public ChatCompletionResponseBuilder()
-
-
Method Details
-
withType
-
withId
-
withRole
-
withContent
public StreamHelper.ChatCompletionResponseBuilder withContent(List<AnthropicApi.ContentBlock> content) -
withModel
-
withStopReason
-
withStopSequence
-
withUsage
-
build
-