feat(developerknowledge): add Developer Knowledge API samples - #14534
feat(developerknowledge): add Developer Knowledge API samples#14534llatif wants to merge 3 commits into
Conversation
Add standalone code samples and test suites for Developer Knowledge API: - search_document_chunks - get_document - batch_get_documents - answer_query
|
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
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.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
From my understanding the Kokoro failures are not caused by this PR, however please advise if this is not the case, thank you :) |
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