xyz.felh.openai.assistant.stream.StreamEvent Maven / Gradle / Ivy
package xyz.felh.openai.assistant.stream;
import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import xyz.felh.openai.IOpenAiApiObject;
/**
* thread.created
* data is a thread
*
* Occurs when a new thread is created.
*
* thread.run.created
* data is a run
*
* Occurs when a new run is created.
*
* thread.run.queued
* data is a run
*
* Occurs when a run moves to a queued status.
*
* thread.run.in_progress
* data is a run
*
* Occurs when a run moves to an in_progress status.
*
* thread.run.requires_action
* data is a run
*
* Occurs when a run moves to a requires_action status.
*
* thread.run.completed
* data is a run
*
* Occurs when a run is completed.
*
* thread.run.failed
* data is a run
*
* Occurs when a run fails.
*
* thread.run.cancelling
* data is a run
*
* Occurs when a run moves to a cancelling status.
*
* thread.run.cancelled
* data is a run
*
* Occurs when a run is cancelled.
*
* thread.run.expired
* data is a run
*
* Occurs when a run expires.
*
* thread.run.step.created
* data is a run step
*
* Occurs when a run step is created.
*
* thread.run.step.in_progress
* data is a run step
*
* Occurs when a run step moves to an in_progress state.
*
* thread.run.step.delta
* data is a run step delta
*
* Occurs when parts of a run step are being streamed.
*
* thread.run.step.completed
* data is a run step
*
* Occurs when a run step is completed.
*
* thread.run.step.failed
* data is a run step
*
* Occurs when a run step fails.
*
* thread.run.step.cancelled
* data is a run step
*
* Occurs when a run step is cancelled.
*
* thread.run.step.expired
* data is a run step
*
* Occurs when a run step expires.
*
* thread.message.created
* data is a message
*
* Occurs when a message is created.
*
* thread.message.in_progress
* data is a message
*
* Occurs when a message moves to an in_progress state.
*
* thread.message.delta
* data is a message delta
*
* Occurs when parts of a Message are being streamed.
*
* thread.message.completed
* data is a message
*
* Occurs when a message is completed.
*
* thread.message.incomplete
* data is a message
*
* Occurs when a message ends before it is completed.
*
* error
* data is an error
*
* Occurs when an error occurs. This can happen due to an internal server error or a timeout.
*
* done
* data is [DONE]
*
* Occurs when a stream ends.
*/
@Data
public class StreamEvent implements IOpenAiApiObject {
@JSONField(name = "event")
@JsonProperty("event")
private String event;
@JSONField(name = "data")
@JsonProperty("data")
private IOpenAiApiObject data;
}