Google Cloud Retail V2 Client - Class GenerativeQuestionConfig (2.1.0)

Reference documentation and code samples for the Google Cloud Retail V2 Client class GenerativeQuestionConfig.

Configuration for a single generated question.

Generated from protobuf message google.cloud.retail.v2.GenerativeQuestionConfig

Namespace

Google \ Cloud \ Retail \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ catalog string

Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}

↳ facet string

Required. The facet to which the question is associated.

↳ generated_question string

Output only. The LLM generated question.

↳ final_question string

Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.

↳ example_values array

Output only. Values that can be used to answer the question.

↳ frequency float

Output only. The ratio of how often a question was asked.

↳ allowed_in_conversation bool

Optional. Whether the question is asked at serving time.

getCatalog

Required. Resource name of the catalog.

Format: projects/{project}/locations/{location}/catalogs/{catalog}

Returns
Type Description
string

setCatalog

Required. Resource name of the catalog.

Format: projects/{project}/locations/{location}/catalogs/{catalog}

Parameter
Name Description
var string
Returns
Type Description
$this

getFacet

Required. The facet to which the question is associated.

Returns
Type Description
string

setFacet

Required. The facet to which the question is associated.

Parameter
Name Description
var string
Returns
Type Description
$this

getGeneratedQuestion

Output only. The LLM generated question.

Returns
Type Description
string

setGeneratedQuestion

Output only. The LLM generated question.

Parameter
Name Description
var string
Returns
Type Description
$this

getFinalQuestion

Optional. The question that will be used at serving time.

Question can have a max length of 300 bytes. When not populated, generated_question should be used.

Returns
Type Description
string

setFinalQuestion

Optional. The question that will be used at serving time.

Question can have a max length of 300 bytes. When not populated, generated_question should be used.

Parameter
Name Description
var string
Returns
Type Description
$this

getExampleValues

Output only. Values that can be used to answer the question.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setExampleValues

Output only. Values that can be used to answer the question.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getFrequency

Output only. The ratio of how often a question was asked.

Returns
Type Description
float

setFrequency

Output only. The ratio of how often a question was asked.

Parameter
Name Description
var float
Returns
Type Description
$this

getAllowedInConversation

Optional. Whether the question is asked at serving time.

Returns
Type Description
bool

setAllowedInConversation

Optional. Whether the question is asked at serving time.

Parameter
Name Description
var bool
Returns
Type Description
$this