ParseSSEChunksFunc parses the same stream as ParseSSEChunks but hands each.
func ParseSSEChunksFunc(r io.Reader, onChunk func(map[string]any) ) errorParseSSEChunksFunc parses the same stream as ParseSSEChunks but hands each object to onChunk instead of retaining it, so peak memory does not grow with the length of the stream. Parsing stops at the first malformed line, which is returned as an error; objects before it have already been passed to onChunk.