HandlesTextStreaming
trait HandlesTextStreaming
Methods
processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody)
Process a Cohere Chat API event stream.
endReasoning(string $invocationId, string|null $reasoningId)
Emit a reasoning end event if a reasoning block is open.
string
generateEventId()
Generate a lowercase UUID v7 for use as a stream event ID.
Details
at line 33
protected Generator
processTextStream(string $invocationId, Provider $provider, string $model, StreamInterface $streamBody)
Process a Cohere Chat API event stream.
at line 201
protected Generator
endReasoning(string $invocationId, string|null $reasoningId)
Emit a reasoning end event if a reasoning block is open.
at line 219
protected string
generateEventId()
Generate a lowercase UUID v7 for use as a stream event ID.