Add Kotlin tabs for grounding with Agent Search - #2160
Open
happyhuman wants to merge 2 commits into
Open
Conversation
Both tab groups on the page showed Python and Java only, though VertexAiSearchTool has existed in adk-kotlin since v0.1.0. Kotlin uses the constructor directly rather than the builder the Java tab reaches for, since dataStoreId is a named parameter. The citation snippet collects from the event Flow instead of iterating a list, and reads isFinalResponse as a property. Both tabs are inline, matching their siblings: the snippets elide surrounding setup and carry placeholder datastore ids, so there is nothing here that could compile standalone.
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The badge said Kotlin v0.8.0, the version adk-docs compiles against, rather than the introducing release. VertexAiSearchTool has been present since v0.1.0, matching the Python v0.1.0 and Java v0.1.0 badges already on this page.
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.
What
Adds Kotlin to both tab groups on
docs/grounding/grounding_with_search.md— creating the grounded agent, and the optional citation display — plus theKotlin v0.1.0badge.Why
Both groups showed Python and Java only.
VertexAiSearchToolhas been in adk-kotlin since v0.1.0; this was missed because earlier coverage audits diffed release tags against each other and never checked the v0.1.0 baseline.Translation notes
VertexAiSearchTool.builder().dataStoreId(...).build(). Kotlin has named parameters, so the tab uses the constructor directly. The builder does exist at v0.8.0, but it is marked@AdkJavaInteropApiand exists for Java callers.collect, not a for-loop. Events arrive as aFlow<Event>in Kotlin, andisFinalResponseis a property rather than a method.groundingChunksis nullable, so the count is guarded withisNullOrEmpty()rather than Java'sisPresent().Verification
Both tabs are inline, matching their siblings — the snippets elide surrounding setup and carry placeholder datastore ids, so there is nothing that could compile standalone. They are covered by L0, which validates every import and named argument against the real v0.8.0 signatures, and not by the compiler. That is the same level of assurance the Python and Java tabs on this page have.
Ladder: L0, L3, L5, L6 PASS; L1/L2 PASS across the unchanged snippet tree; L4
runSnippetsSKIP (no such Gradle task in this repo).Tracked as KT-27.
Update: the badge originally read
Kotlin v0.8.0, which is the version adk-docs compiles against, not the release the feature shipped in. Corrected to the introducing version, matching the sibling badges and the rest of the site.