Interface AssistantStreamEventSubscriber
public interface AssistantStreamEventSubscriber
An interface which is used to subscribe to assistant events emitted when streaming a Run.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Will be called when the stream is complete or an exception has happenedvoid
onException
(Throwable ex) Will be called if any exception happens while processingvoid
Will be called when the event data isThread
void
onThreadMessage
(String event, ThreadMessage threadMessage) Will be called when the event data isThreadMessage
void
onThreadMessageDelta
(String event, ThreadMessageDelta threadMessageDelta) Will be called when the event data isThreadMessageDelta
void
onThreadRun
(String event, ThreadRun threadRun) Will be called when the event data isThreadRun
void
onThreadRunStep
(String event, ThreadRunStep threadRunStep) Will be called when the event data isThreadRunStep
void
onThreadRunStepDelta
(String event, ThreadRunStepDelta threadRunStepDelta) Will be called when the event data isThreadRunStepDelta
void
onUnknownEvent
(String event, String data) Will be called when an unsupported assistant event is emitted.
-
Method Details
-
onThread
Will be called when the event data isThread
-
onThreadRun
Will be called when the event data isThreadRun
-
onThreadRunStep
Will be called when the event data isThreadRunStep
-
onThreadRunStepDelta
Will be called when the event data isThreadRunStepDelta
-
onThreadMessage
Will be called when the event data isThreadMessage
-
onThreadMessageDelta
Will be called when the event data isThreadMessageDelta
-
onUnknownEvent
Will be called when an unsupported assistant event is emitted.- Parameters:
data
- the raw data which was emitted
-
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
-