feat(vertexai): Add sample retail_v2_search_request#5521
feat(vertexai): Add sample retail_v2_search_request#5521amcolin wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new retail package within the vertexai directory, providing a sample implementation for searching products using the Google Cloud Retail API. The feedback focuses on fixing a bug in the search result iteration that could cause an infinite loop, improving the API design by passing a context parameter to the search function, and correcting documentation typos.
f8ee201 to
be91ae2
Compare
be91ae2 to
4a7f3da
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new retail package within the vertexai directory, providing sample implementations for product searching using Vertex AI Search for commerce. It includes the searchOffset and searchRequest functions, which support text and browse searches with pagination, along with their respective unit tests. Review feedback identified inconsistencies in the function documentation where parameter descriptions and order did not match the actual code signatures.
b47c529 to
b37ea03
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new retail package within the vertexai directory, providing sample implementations for product search functionality using the Vertex AI Retail API. The added samples demonstrate how to perform search requests with offsets, handle pagination using page tokens, and execute general text or browse searches. Feedback is provided to correct a typo in a documentation comment and to improve error handling by utilizing the %w verb for error wrapping in Go, as well as fixing a misleading error message in the pagination logic.
43cbf38 to
59ebbac
Compare
|
Here is the summary of changes. You are about to add 3 region tags.
This comment is generated by snippet-bot.
|
Description
This PR adds Go implementation parity for the search samples introduced in python-docs-samples #13996.
Changes
searchRequest,searchOffsetandsearchPaginationGo samples.Fixes Internal b/502581509
For the new test
It needs API enabled for Vertex Search as it is mentioned on the test that are failing:
Checklist
go test -v ./..(see Testing)gofmt(see Formatting)go vet(see Formatting)