StreamingParser

org.llm4s.llmconnect.streaming.SSEParser.StreamingParser

Parse streaming data with a buffer for incomplete events. This is useful for parsing data as it arrives from a network stream.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addChunk(chunk: String): Unit

Add chunk of data to the parser

Add chunk of data to the parser

Attributes

def clear(): Unit

Clear the parser state

Clear the parser state

Attributes

def flush(): Option[SSEEvent]

Flush any remaining buffered data as an event

Flush any remaining buffered data as an event

Attributes

def getEvents(): Seq[SSEEvent]

Get all available events

Get all available events

Attributes

def hasEvents: Boolean

Check if there are events available

Check if there are events available

Attributes

def nextEvent(): Option[SSEEvent]

Get next available event

Get next available event

Attributes