Interface ChatResponseHandler.Visitor.Builder
- Enclosing interface:
ChatResponseHandler.Visitor
@Generated("software.amazon.awssdk:codegen")
public static interface ChatResponseHandler.Visitor.Builder
Builder for
ChatResponseHandler.Visitor. The ChatResponseHandler.Visitor class may also be extended for a more traditional style but
this builder allows for a more functional way of creating a visitor will callback methods.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Callback to invoke when aChatChunkEventis visited.Callback to invoke when either an unknown event is visited or an unhandled event is visited.Callback to invoke when aChatErrorEventis visited.Callback to invoke when aChatResponseEventis visited.Callback to invoke when aChatToolCallEventis visited.
-
Method Details
-
onDefault
Callback to invoke when either an unknown event is visited or an unhandled event is visited.- Parameters:
c- Callback to process the event.- Returns:
- This builder for method chaining.
-
build
ChatResponseHandler.Visitor build()- Returns:
- Visitor implementation.
-
onChunk
Callback to invoke when aChatChunkEventis visited.- Parameters:
c- Callback to process the event.- Returns:
- This builder for method chaining.
-
onToolCall
Callback to invoke when aChatToolCallEventis visited.- Parameters:
c- Callback to process the event.- Returns:
- This builder for method chaining.
-
onResponse
Callback to invoke when aChatResponseEventis visited.- Parameters:
c- Callback to process the event.- Returns:
- This builder for method chaining.
-
onError
Callback to invoke when aChatErrorEventis visited.- Parameters:
c- Callback to process the event.- Returns:
- This builder for method chaining.
-