Package com.morpheusdata.response
Interface LlmStreamingResponseHandler
public interface LlmStreamingResponseHandler
Callback handler for streamed LLM responses.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonCompleteResponse(LlmChatResponse response) Called when a streaming response completes successfully.default voidCalled when the streaming response fails.default voidonPartialResponse(String partialText) Called for partial text output from a streaming response.
-
Method Details
-
onPartialResponse
Called for partial text output from a streaming response.- Parameters:
partialText- partial output text
-
onCompleteResponse
Called when a streaming response completes successfully.- Parameters:
response- completed chat response metadata and content
-
onError
Called when the streaming response fails.- Parameters:
error- failure exception
-