Documentation
¶
Overview ¶
Package sse provides shared server-sent event decoding helpers.
Index ¶
Constants ¶
View Source
const MemoryContextRedaction = "[memory-context redacted]"
MemoryContextRedaction is emitted when prompt-only memory fences are removed.
Variables ¶
View Source
var ErrStop = errors.New("sse: stop stream")
ErrStop stops SSE decoding without surfacing an error.
Functions ¶
func Decode ¶
Decode reads one SSE stream from body until EOF, context cancellation, or a handler error. Decode closes body only when ctx is canceled so a blocked Read can unblock and observe the cancellation.
func ScrubMemoryContextBytes ¶
ScrubMemoryContextBytes removes prompt-only memory fences from raw SSE bytes.
func ScrubMemoryContextString ¶
ScrubMemoryContextString removes literal and JSON-escaped memory context fences.
Types ¶
Click to show internal directories.
Click to hide internal directories.