trait HandlesTextStreaming

Methods

processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody)

Process a Gemini streaming response and yield Hypervel stream events.

void
appendStepText(array $steps, int|string $index, string $type, string $text, string $key = 'content')

Append streamed text to the step being accumulated at the given index.

string
generateEventId()

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

Details

at line 34
protected Generator processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody)

Process a Gemini streaming response and yield Hypervel stream events.

Parameters

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

Return Value

Generator

at line 262
protected void appendStepText(array $steps, int|string $index, string $type, string $text, string $key = 'content')

Append streamed text to the step being accumulated at the given index.

Parameters

array $steps
int|string $index
string $type
string $text
string $key

Return Value

void

at line 272
protected string generateEventId()

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

Return Value

string