Skip to content

feat(developerknowledge): add Developer Knowledge API samples - #14534

Open
llatif wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
llatif:feat/developerknowledge-samples
Open

feat(developerknowledge): add Developer Knowledge API samples#14534
llatif wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
llatif:feat/developerknowledge-samples

Conversation

@llatif

@llatif llatif commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Python code samples and tests for the Google Developer Knowledge API (google-developer-knowledge).

Included Samples:

  • search_document_chunks.py: Search public developer documentation chunks by query (developerknowledge_search_document_chunks).
  • get_document.py: Retrieve a single documentation page by URI resource name (developerknowledge_get_document).
  • batch_get_documents.py: Fetch multiple documentation pages in one call (developerknowledge_batch_get_documents).
  • answer_query.py: Get grounded, cited answers to technical questions (developerknowledge_answer_query).

Tracking

  • Issue / Bug: b/550427118

Add standalone code samples and test suites for Developer Knowledge API:
- search_document_chunks
- get_document
- batch_get_documents
- answer_query
@llatif
llatif requested review from a team as code owners August 22, 2026 01:29
@snippet-bot

snippet-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 4 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Aug 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Python code samples and tests for the Google Developer Knowledge API, including scripts for answering queries, retrieving documents, batch-retrieving documents, and searching document chunks. It also includes a conftest.py file with mock implementations to facilitate local testing. The only feedback is to correct the test execution command in the README.md, as it currently references a non-existent samples_test.py file instead of running pytest directly.

Comment thread developer-knowledge/README.md Outdated
llatif and others added 2 commits August 21, 2026 18:33
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@llatif
llatif marked this pull request as draft August 22, 2026 03:49
@llatif
llatif marked this pull request as ready for review August 22, 2026 03:53
@llatif

llatif commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

From my understanding the Kokoro failures are not caused by this PR, however please advise if this is not the case, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant