Class MessageAggregator
java.lang.Object
org.springframework.ai.chat.model.MessageAggregator
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
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<ChatResponse>
aggregate
(reactor.core.publisher.Flux<ChatResponse> fluxChatResponse, Consumer<ChatResponse> onAggregationComplete)
-
Constructor Details
-
MessageAggregator
public MessageAggregator()
-
-
Method Details
-
aggregate
public reactor.core.publisher.Flux<ChatResponse> aggregate(reactor.core.publisher.Flux<ChatResponse> fluxChatResponse, Consumer<ChatResponse> onAggregationComplete)
-