map_anthropic_chunk: Map native Anthropic SSE event to aggregator calls

View source: R/sse_aggregator.R

map_anthropic_chunkR Documentation

Map native Anthropic SSE event to aggregator calls

Description

Translates a native Anthropic Messages API SSE event into the appropriate SSEAggregator method calls.

Usage

map_anthropic_chunk(event_type, event_data, agg)

Arguments

event_type

SSE event type string (e.g. "content_block_delta").

event_data

Parsed JSON data from SSE event.

agg

An SSEAggregator instance.

Value

Logical TRUE if the stream should break (message_stop received).


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