docs(streaming): fix inverted env var, wrong defaults, broken snippets - #2023
Open
GWeale wants to merge 2 commits into
Open
docs(streaming): fix inverted env var, wrong defaults, broken snippets#2023GWeale wants to merge 2 commits into
GWeale wants to merge 2 commits into
Conversation
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Corrections to the
docs/streaming/pages: snippets that can't run, an environment variable documented with inverted polarity, and several defaults documented backwards.Changes
docs/streaming/dev-guide/part4.md— progressive SSE streaming was documented as off-by-default and enabled withexport ADK_ENABLE_PROGRESSIVE_SSE_STREAMING=1; it is on by default and turned off withADK_DISABLE_PROGRESSIVE_SSE_STREAMING=1. Also:response_modalitiesislist[Modality], notlist[str];run_live()does not readstreaming_mode(that selectsNONEvsSSEforrun_async()); noted the reconnect loop re-raises after 5 consecutive failures; arun_live(session=...)call now passesuser_id/session_id.docs/streaming/dev-guide/part3.md— the tool example was a non-asyncdefcontainingawait, and took anInvocationContext; it is nowasync deftaking aToolContext, usingtool_context.stateandtool_context.save_artifact(), with a warning that a tool cannot setend_invocation(it only gets a copy of the InvocationContext). Also: a streaming-display snippet was gated onif not event.partial:(that's the final merged event, not the incremental ones); transcriptions were described as always complete when incremental chunks arrive withpartial=True; audio artifact saving and cache flushing are gated onRunConfig.save_live_blob; transcription is on by default; aggregation happens inGeminiLlmConnection.receive(), not aStreamingResponseAggregator; streaming-tool queues are registered lazily on first call rather than up front, and the line-number code references were replaced with function names; fixed an indentation error that placedawait play_audio(...)outside its loop.docs/streaming/dev-guide/part2.md—LiveRequestwas missing itspartialandstate_deltafields; the claim that ADK auto-creates an event loop forLiveRequestQueueis wrong (nothing is created — the underlyingasyncio.Queuebinds late, on first wait); and the automaticclose()applies to ADK's internal CFC queue, not to a queue you create and pass torun_live().docs/streaming/dev-guide/part1.md— the Gemini API version was listed asv1beta; it isv1alpha. A missing session raisesSessionNotFoundError(aValueErrorsubclass), andRunner(..., auto_create_session=True)avoids it.docs/streaming/configuration.md— added thatinput_audio_transcription/output_audio_transcriptiondefault toAudioTranscriptionConfig(), notNone, so both sides are transcribed unless you opt out, plus a pointer to the full RunConfig reference.docs/streaming/dev-guide/part5.md— twoAgent(...)snippets omitted the requiredname=.docs/streaming/streaming-tools.md—Part.from_text(prompt_text)→Part.from_text(text=prompt_text); the argument is keyword-only.How this was produced
Part of a page-by-page audit of the Python docs against the
google/adk-pythonv2.5.0 source: every import resolved against a real 2.5.0 install, every constructor kwarg checked againstmodel_fields/inspect.signature, every documented default read off the field. A second independent pass re-derived each claim from source rather than trusting the finding, and a third conformed the new wording to the surrounding pages.mkdocs build --strictis clean.Only Python tabs and language-neutral prose were touched — this audit had no ground truth for the Go / Java / TypeScript SDKs.
Split out of a larger audit branch so each area can be reviewed on its own.