map_openai_chunk: Map OpenAI SSE chunk to aggregator calls

View source: R/sse_aggregator.R

map_openai_chunkR Documentation

Map OpenAI SSE chunk to aggregator calls

Description

Translates an OpenAI Chat Completions SSE data chunk into the appropriate SSEAggregator method calls.

Usage

map_openai_chunk(data, done, agg)

Arguments

data

Parsed JSON data from SSE event (or NULL if done).

done

Logical, TRUE if stream is complete.

agg

An SSEAggregator instance.


aisdk documentation built on May 29, 2026, 9:07 a.m.