Interface LlmStreamingResponseHandler


public interface LlmStreamingResponseHandler
Callback handler for streamed LLM responses.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called when a streaming response completes successfully.
    default void
    Called when the streaming response fails.
    default void
    Called for partial text output from a streaming response.
  • Method Details

    • onPartialResponse

      default void onPartialResponse(String partialText)
      Called for partial text output from a streaming response.
      Parameters:
      partialText - partial output text
    • onCompleteResponse

      default void onCompleteResponse(LlmChatResponse response)
      Called when a streaming response completes successfully.
      Parameters:
      response - completed chat response metadata and content
    • onError

      default void onError(Throwable error)
      Called when the streaming response fails.
      Parameters:
      error - failure exception