HandlesTextStreaming
trait HandlesTextStreaming
Methods
processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody)
Process an Ollama NDJSON streaming response and yield Hypervel stream events.
parseNdjsonStream(StreamInterface $streamBody)
Parse an Ollama NDJSON stream, yielding each parsed JSON object.
string
generateEventId()
Generate a lowercase UUID v7 for use as a stream event ID.
Details
at line 35
protected Generator
processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody)
Process an Ollama NDJSON streaming response and yield Hypervel stream events.
at line 256
protected Generator
parseNdjsonStream(StreamInterface $streamBody)
Parse an Ollama NDJSON stream, yielding each parsed JSON object.
at line 276
protected string
generateEventId()
Generate a lowercase UUID v7 for use as a stream event ID.