Package nl.dannyj.mistral.net
Interface ChatCompletionChunkCallback
public interface ChatCompletionChunkCallback
Interface for handling streaming chat completion requests.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonChunkReceived(MessageChunk chunk) Called when a new message chunk of the response is received.voidCalled when the entire response is received.voidCalled when an error occurs during the streaming request.
-
Method Details
-
onChunkReceived
Called when a new message chunk of the response is received.- Parameters:
chunk- The received chunk
-
onComplete
void onComplete()Called when the entire response is received. -
onError
Called when an error occurs during the streaming request.- Parameters:
e- The exception representing the error
-