|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library โ LangGraph for C++
|
Incremental Server-Sent Events parser. More...
Go to the source code of this file.
Incremental Server-Sent Events parser.
Stage 3 / Semester 1.4 โ decodes the SSE wire format that OpenAI's /v1/chat/completions and Anthropic's /v1/messages stream over HTTP/1.1 chunked transport.
Pure state machine: bytes in (feed), complete events out (drain). The caller pairs this with a transport that delivers byte chunks (typically async_post_stream), since one HTTP chunk may contain partial, whole, or multiple SSE events.
Not supported on purpose (per SSE spec ยง9 we skip the bits LLM providers don't emit):
What's included is exactly what the two provider streams use.
Definition in file sse_parser.h.