Google Cloud Dialogflow Cx V3 Client - Class Generator (0.1.1)

Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Generator.

Generators contain prompt to be sent to the LLM model to generate text. The prompt can contain parameters which will be resolved before calling the model. It can optionally contain banned phrases to ensure the model responses are safe.

Generated from protobuf message google.cloud.dialogflow.cx.v3.Generator

Namespace

Google \ Cloud \ Dialogflow \ Cx \ V3

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/generators/<Generator ID>.

↳ display_name string

Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.

↳ prompt_text Google\Cloud\Dialogflow\Cx\V3\Phrase

Required. Prompt for the LLM model.

↳ placeholders array<Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder>

Optional. List of custom placeholders in the prompt text.

getName

The unique identifier of the generator.

Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/generators/<Generator ID>.

Returns
TypeDescription
string

setName

The unique identifier of the generator.

Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/generators/<Generator ID>.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisplayName

Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.

Returns
TypeDescription
string

setDisplayName

Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPromptText

Required. Prompt for the LLM model.

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\Phrase|null

hasPromptText

clearPromptText

setPromptText

Required. Prompt for the LLM model.

Parameter
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\Phrase
Returns
TypeDescription
$this

getPlaceholders

Optional. List of custom placeholders in the prompt text.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setPlaceholders

Optional. List of custom placeholders in the prompt text.

Parameter
NameDescription
var array<Google\Cloud\Dialogflow\Cx\V3\Generator\Placeholder>
Returns
TypeDescription
$this