Class ChatClientMessageAggregator
java.lang.Object
org.springframework.ai.chat.client.ChatClientMessageAggregator
Helper that for streaming chat responses, aggregate the chat response messages into a
single AssistantMessage. Job is performed in parallel to the chat response processing.
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Alexandros Pappas, Thomas Vitale
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<ChatClientResponse>
aggregateChatClientResponse
(reactor.core.publisher.Flux<ChatClientResponse> chatClientResponses, Consumer<ChatClientResponse> aggregationHandler)
-
Constructor Details
-
ChatClientMessageAggregator
public ChatClientMessageAggregator()
-
-
Method Details
-
aggregateChatClientResponse
public reactor.core.publisher.Flux<ChatClientResponse> aggregateChatClientResponse(reactor.core.publisher.Flux<ChatClientResponse> chatClientResponses, Consumer<ChatClientResponse> aggregationHandler)
-