class

AI::Google::GoogleSSEStreamIterator

Inherits Iterator < Enumerable < Reference < Object

SSE Stream Iterator for Google Generative AI streaming responses.

Parses Server-Sent Events (SSE) from the Google API and yields stream parts for text, reasoning, tool calls, files, and sources.

Constructors

new(response_body : String, warnings : Array(Provider::Shared::Warning), generate_id : Proc(String), provider_options_name : String)
Source

Instance methods

next

Returns the next element in this iterator, or Iterator::Stop::INSTANCE if there are no more elements.

Source