Interface HttpStreamingChatPublisher.Sink

Enclosing class:
HttpStreamingChatPublisher

public static interface HttpStreamingChatPublisher.Sink
Consumes the upstream HttpStreamingEvents of a single subscription and drives the assembled ChatModelStreamingEvents into the Tube (typically via a TubeBackedStreamingChatResponseHandler). Provider-specific.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    The upstream stream completed; finalize (build and emit the response, complete the tube).
    void
    The upstream stream failed.
    void
    Handle one upstream event (e.g. an HttpResponseReceived or a ServerSentEvent).
  • Method Details

    • onEvent

      void onEvent(HttpStreamingEvent event)
      Handle one upstream event (e.g. an HttpResponseReceived or a ServerSentEvent).
    • onError

      void onError(Throwable error)
      The upstream stream failed.
    • onComplete

      void onComplete()
      The upstream stream completed; finalize (build and emit the response, complete the tube).