Interface ChatCompletionStreamSubscriber
public interface ChatCompletionStreamSubscriber
An interface which is used to subscribe to streamed partial responses
-
Method Summary
Modifier and TypeMethodDescriptionvoidonChunk(ChatCompletionChunk chunk) Will be called when a partial response is receivedvoidWill be called when the stream is complete or an exception has happenedvoidonException(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
-