google.internal.lower_journal

ai.Journal -> generateContent `contents`. Only promptable events lower; ai.RunStarted, ai.ToolRequested, ai.Usage, and ai.FinalProduced are journal-only. Consecutive tool results merge into ONE user content of functionResponse parts, matching how Gemini expects results for a multi-call turn. Gemini correlates results by tool NAME, not id (`ai.wire.tool_name`).

Reference version

Signature

function google.internal.lower_journal(
j: ai.Journal,
fetch_url: bool,
preview: bool = …
) -> google.internal.GmContent[] throws baml.errors.InvalidArgument | baml.errors.Io | baml.errors.Timeout | ai.errors.NetworkFailure | ai.errors.PreviewUnsupported

ai.Journal -> generateContent contents. Only promptable events lower; ai.RunStarted, ai.ToolRequested, ai.Usage, and ai.FinalProduced are journal-only. Consecutive tool results merge into ONE user content of functionResponse parts, matching how Gemini expects results for a multi-call turn. Gemini correlates results by tool NAME, not id (ai.wire.tool_name).

Source:<builtin>/google/ns_internal/gemini.bamlbytes 2022724797