SSEEvent
Server-Sent Event (SSE) data. Represents a single event from an SSE stream (text/event-stream). Used with LLM APIs (OpenAI, Claude, Gemini) for streaming responses.
Operations
GetData
Gets the event data (from "data:" field)
method : public : GetData() ~ StringReturn
| Type | Description |
|---|---|
| String | event data |
GetEvent
Gets the event type (from "event:" field, or "message" by default)
method : public : GetEvent() ~ StringReturn
| Type | Description |
|---|---|
| String | event type |
GetId
Gets the event ID (from "id:" field, may be Nil)
method : public : GetId() ~ StringReturn
| Type | Description |
|---|---|
| String | event id |
IsDone
Checks if this is the stream termination signal (data is "[DONE]")
method : public : IsDone() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if done |