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 messagegoogle.cloud.dialogflow.cx.v3.Generator
Namespace
Google \ Cloud \ Dialogflow \ Cx \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
The unique identifier of the generator. Must be set for theGenerators.UpdateGeneratormethod.Generators.CreateGeneratepopulates the name automatically. Format:projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>.
↳ 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.
Parameters passed to the LLM to configure its behavior.
getName
The unique identifier of the generator.
Must be set for theGenerators.UpdateGeneratormethod.Generators.CreateGeneratepopulates the name automatically.
Format:projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>.
Returns
Type
Description
string
setName
The unique identifier of the generator.
Must be set for theGenerators.UpdateGeneratormethod.Generators.CreateGeneratepopulates the name automatically.
Format:projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/generators/<GeneratorID>.
Parameter
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dialogflow Cx V3 Client - Class Generator (0.8.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.1 (latest)](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Generator)\n- [0.8.0](/php/docs/reference/cloud-dialogflow-cx/0.8.0/V3.Generator)\n- [0.7.2](/php/docs/reference/cloud-dialogflow-cx/0.7.2/V3.Generator)\n- [0.6.0](/php/docs/reference/cloud-dialogflow-cx/0.6.0/V3.Generator)\n- [0.5.2](/php/docs/reference/cloud-dialogflow-cx/0.5.2/V3.Generator)\n- [0.4.1](/php/docs/reference/cloud-dialogflow-cx/0.4.1/V3.Generator)\n- [0.3.4](/php/docs/reference/cloud-dialogflow-cx/0.3.4/V3.Generator)\n- [0.2.1](/php/docs/reference/cloud-dialogflow-cx/0.2.1/V3.Generator)\n- [0.1.1](/php/docs/reference/cloud-dialogflow-cx/0.1.1/V3.Generator) \nReference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Generator.\n\nGenerators contain prompt to be sent to the LLM model to generate text. The\nprompt can contain parameters which will be resolved before calling the\nmodel. It can optionally contain banned phrases to ensure the model responses\nare safe.\n\nGenerated from protobuf message `google.cloud.dialogflow.cx.v3.Generator`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ Cx \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nThe unique identifier of the generator.\n\nMust be set for the\n[Generators.UpdateGenerator](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.GeneratorsClient#_Google_Cloud_Dialogflow_Cx_V3_Client_GeneratorsClient__updateGenerator__)\nmethod. Generators.CreateGenerate populates the name automatically.\nFormat:\n`projects/\u003cProjectID\u003e/locations/\u003cLocationID\u003e/agents/\u003cAgentID\u003e/generators/\u003cGeneratorID\u003e`.\n\n### setName\n\nThe unique identifier of the generator.\n\nMust be set for the\n[Generators.UpdateGenerator](/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.GeneratorsClient#_Google_Cloud_Dialogflow_Cx_V3_Client_GeneratorsClient__updateGenerator__)\nmethod. Generators.CreateGenerate populates the name automatically.\nFormat:\n`projects/\u003cProjectID\u003e/locations/\u003cLocationID\u003e/agents/\u003cAgentID\u003e/generators/\u003cGeneratorID\u003e`.\n\n### getDisplayName\n\nRequired. The human-readable name of the generator, unique within the\nagent. The prompt contains pre-defined parameters such as $conversation,\n$last-user-utterance, etc. populated by Dialogflow. It can also contain\ncustom placeholders which will be resolved during fulfillment.\n\n### setDisplayName\n\nRequired. The human-readable name of the generator, unique within the\nagent. The prompt contains pre-defined parameters such as $conversation,\n$last-user-utterance, etc. populated by Dialogflow. It can also contain\ncustom placeholders which will be resolved during fulfillment.\n\n### getPromptText\n\nRequired. Prompt for the LLM model.\n\n### hasPromptText\n\n### clearPromptText\n\n### setPromptText\n\nRequired. Prompt for the LLM model.\n\n### getPlaceholders\n\nOptional. List of custom placeholders in the prompt text.\n\n### setPlaceholders\n\nOptional. List of custom placeholders in the prompt text.\n\n### getModelParameter\n\nParameters passed to the LLM to configure its behavior.\n\n### hasModelParameter\n\n### clearModelParameter\n\n### setModelParameter\n\nParameters passed to the LLM to configure its behavior."]]