class ProjectsLocationsCatalogsPlacements extends Resource (View source)

The "placements" collection of methods.

Typical usage is:

 $retailService = new Google\Service\CloudRetail(...);
 $placements = $retailService->projects_locations_catalogs_placements;

Methods

predict(string $placement, GoogleCloudRetailV2PredictRequest $postBody, array $optParams = [])

Makes a recommendation prediction. (placements.predict)

search(string $placement, GoogleCloudRetailV2SearchRequest $postBody, array $optParams = [])

Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature. (placements.search)

Details

GoogleCloudRetailV2PredictResponse predict(string $placement, GoogleCloudRetailV2PredictRequest $postBody, array $optParams = [])

Makes a recommendation prediction. (placements.predict)

Parameters

string $placement

Required. Full resource name of the format: {placem ent=projects/locations/global/catalogs/default_catalog/servingConfigs} or {placement=projects/locations/global/catalogs/default_catalog/placements}. We recommend using the servingConfigs resource. placements is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs

GoogleCloudRetailV2PredictRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2PredictResponse

Exceptions

Exception

Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature. (placements.search)

Parameters

string $placement

Required. The resource name of the Retail Search serving config, such as projects/locations/global/catalogs/default_catalog/s ervingConfigs/default_serving_config or the name of the legacy placement resource, such as projects/locations/global/catalogs/default_catalog/placeme nts/default_search. This field is used to identify the serving config name and the set of models that are used to make the search.

GoogleCloudRetailV2SearchRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRetailV2SearchResponse

Exceptions

Exception