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 \ V3Methods
__construct
Constructor.
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
↳ 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>
.
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>
.
var
string
$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.
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.
var
string
$this
getPromptText
Required. Prompt for the LLM model.
hasPromptText
clearPromptText
setPromptText
Required. Prompt for the LLM model.
$this
getPlaceholders
Optional. List of custom placeholders in the prompt text.
setPlaceholders
Optional. List of custom placeholders in the prompt text.
$this