-
Stefy Lanza (nextime / spora ) authored
- Use generate_content_stream() for streaming requests - Create async generator that yields OpenAI-compatible chunks - Extract text from each stream chunk - Generate unique chunk IDs - Format chunks as chat.completion.chunk objects - Include delta content in each chunk - Maintain non-streaming functionality for regular requests This fixes the streaming issue where Google GenAI was returning a dict instead of an iterable, causing 'JSONResponse object is not iterable' errors.
8360e33b