trait HandlesTextStreaming

Methods

array
pausedContent(array $messages)

Get the content of the paused steps the turn being continued is made of.

processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody, array $pausedContent = [])

Process a single Anthropic streaming turn and yield Hypervel stream events.

string
generateEventId()

Generate a lowercase UUID v7 for use as a stream event ID.

Details

at line 38
protected array pausedContent(array $messages)

Get the content of the paused steps the turn being continued is made of.

Parameters

array $messages

Return Value

array

at line 54
protected Generator processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody, array $pausedContent = [])

Process a single Anthropic streaming turn and yield Hypervel stream events.

Parameters

string $invocationId
Provider $provider
string $model
StreamInterface $streamBody
array $pausedContent

Return Value

Generator

at line 402
protected string generateEventId()

Generate a lowercase UUID v7 for use as a stream event ID.

Return Value

string