Nous.StreamNormalizer.Gemini (nous v0.13.3)
View SourceStream normalizer for Google Gemini API.
Handles Gemini's SSE streaming format where events arrive as JSON maps
with a candidates array.
Streaming Event Types
| Gemini Event | Normalized Output |
|---|---|
candidates[0].content.parts[0].text | {:text_delta, text} |
candidates[0].content.parts with functionCall | {:tool_call_delta, call} |
candidates[0].finishReason present | {:finish, reason} |
{:stream_done, reason} | {:finish, reason} |
Error with "error" key | {:error, message} |