- HTTP request
- Path parameters
- Request body
- Response body
- Attribute
- ConfidenceLevel
- ClientRequestContext
Generates missing attributes from product information.
HTTP request
POST https://productstudio.googleapis.com/v1/{parent=projects/*}:generateProductTextAttributes
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. Project to make a call. Must refer to a caller's project. Format: |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "inputAttributes": [ { object ( |
Fields | |
---|---|
inputAttributes[] |
Optional. The input attributes used to generate the suggestions. The supported values are: title, description. These attributes will not be included in the response and will not change. |
generativeAttributes[] |
Required. Attributes to be generated. The supported values are gender, age_group, color and size and at least one of those values should be set. Only the values set here will be included in the response. |
offerImage |
Required. Image associated with the product. |
clientRequestContext |
Required. Info about the client making the request. |
allowAnyConfidenceSuggestions |
Optional. If true, attribute suggestions with all confidence levels will be included in the response. By default, only high confidence suggestions are included for all attributes. |
Response body
Response for projects.generateProductTextAttributes.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"suggestions": [
{
object ( |
Fields | |
---|---|
suggestions[] |
The generated product attribute suggestions. This can be empty if the model is not able to suggest attributes with enough confidence scores. The suggestions can be any of gender, age_group, color and size based on the attributes_to_generate in the requuest. |
Attribute
A product attribute which is used in the request and response.
JSON representation |
---|
{
"key": string,
"textValue": string,
"confidenceLevel": enum ( |
Fields | |
---|---|
key |
Required. Attribute name as provided by the merchant. |
textValue |
Optional. Stores the text value of attribute. This must be set for inputAttributes in GenerateProductTextAttributesRequest and for suggestions in GenerateProductTextAttributesResponse. Only text attributes are used/generated at this point and so, attribute_type(eg: INT, RICH_TEXT) and other format_values(eg: float_value, rich_text_value) are not defined. |
confidenceLevel |
Optional. This is present only in the response and will determine the confidence level of the generated attribute suggestion. |
ConfidenceLevel
The confidence level of the attribute suggestion generated by the AI model. The model outputs a confidence score for each suggestion and it is bucketed into one of the confidence levels. The confidence thresholds for each buckets were determined based on human evaluations of the model outputs.
Enums | |
---|---|
CONFIDENCE_LEVEL_UNSPECIFIED |
Unspecified confidence level. |
LOW |
Low confidence level. |
MEDIUM |
Medium confidence level. |
HIGH |
High confidence level. |
ClientRequestContext
Information about the client making the request.
JSON representation |
---|
{ "partnerProductId": string } |
Fields | |
---|---|
partnerProductId |
Required. The product id defined by the partner. |