Class CompleteResponse

java.lang.Object
dev.langchain4j.model.chat.response.CompleteResponse
All Implemented Interfaces:
ChatModelStreamingEvent

@Experimental public class CompleteResponse extends Object implements ChatModelStreamingEvent
The terminal ChatModelStreamingEvent of a streaming chat: the complete, aggregated ChatResponse. It is the streaming counterpart of PartialResponse (a single text chunk) — emitted once, last, after all partial events.

Wrapping ChatResponse (rather than having it implement ChatModelStreamingEvent directly) keeps ChatResponse — which is also returned by the non-streaming ChatModel#chat / ChatModel#chatAsync — free of the streaming-event marker.

Since:
1.20.0
See Also:
  • Constructor Details

    • CompleteResponse

      public CompleteResponse(ChatResponse chatResponse)
  • Method Details