Interface ChatCompletionStreamSubscriber
public interface ChatCompletionStreamSubscriber
An interface which is used to subscribe to streamed partial responses
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onChunk
(ChatCompletionChunk chunk) Will be called when a partial response is receivedvoid
Will be called when the stream is complete or an exception has happenedvoid
onException
(Throwable ex) Will be called if any exception happens while processing
-
Method Details
-
onChunk
Will be called when a partial response is received -
onException
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
-