Interface ChatCompletionStreamSubscriber


public interface ChatCompletionStreamSubscriber
An interface which is used to subscribe to streamed partial responses
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Will be called when a partial response is received
    void
    Will be called when the stream is complete or an exception has happened
    void
    Will be called if any exception happens while processing
  • Method Details

    • onChunk

      void onChunk(ChatCompletionChunk chunk)
      Will be called when a partial response is received
    • onException

      void onException(Throwable ex)
      Will be called if any exception happens while processing
    • onComplete

      void onComplete()
      Will be called when the stream is complete or an exception has happened