Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.49 KB

File metadata and controls

26 lines (18 loc) · 1.49 KB

Vertex AI Search for commerce Samples

This directory contains Java samples for Vertex AI Search for commerce.

Prerequisites

To run these samples, you must have:

  1. A Google Cloud Project with the Vertex AI Search for commerce API enabled.
  2. Vertex AI Search for commerce set up with a valid catalog and serving configuration (placement).
  3. Authentication: These samples use Application Default Credentials (ADC).
    • If running locally, you can set up ADC by running:
      gcloud auth application-default login
  4. IAM Roles: The service account or user running the samples needs the roles/retail.viewer (Retail Viewer) role or higher.

Samples

  • Search.java: Basic search request showing both text search and browse search (using categories).
  • SearchPagination.java: Shows how to use next_page_token to paginate through search results.
  • SearchOffset.java: Shows how to use offset to skip a specified number of results.

Documentation

For more information, see the Vertex AI Search for commerce documentation.