# Google Cloud Dialogflow Cx V3 Client - Class Generator (0.11.1)

0.11.1 (latest) 0.11.0 0.10.2 0.9.2 0.8.1 0.7.2 0.6.0 0.5.2 0.4.1 0.3.4 0.2.1 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** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The unique identifier of the generator. Must be set for the [Generators.UpdateGenerator](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.GeneratorsClient#_Google_Cloud_Dialogflow_Cx_V3_Client_GeneratorsClient__updateGenerator__) method. Generators.CreateGenerate populates 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. |
| `↳ prompt_text` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Phrase` Required. Prompt for the LLM model. |
| `↳ placeholders` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Generator.Placeholder>` Optional. List of custom placeholders in the prompt text. |
| `↳ llm_model_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.LlmModelSettings` The LLM model settings. |
| `↳ model_parameter` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Generator.ModelParameter` Parameters passed to the LLM to configure its behavior. |

### getName

The unique identifier of the generator.

Must be set for the
[Generators.UpdateGenerator](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.GeneratorsClient#_Google_Cloud_Dialogflow_Cx_V3_Client_GeneratorsClient__updateGenerator__)
method. Generators.CreateGenerate populates 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 the
[Generators.UpdateGenerator](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.GeneratorsClient#_Google_Cloud_Dialogflow_Cx_V3_Client_GeneratorsClient__updateGenerator__)
method. Generators.CreateGenerate populates 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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPromptText

Required. Prompt for the LLM model.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Phrase|null` |   |

### hasPromptText

### clearPromptText

### setPromptText

Required. Prompt for the LLM model.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Phrase` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPlaceholders

Optional. List of custom placeholders in the prompt text.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Generator.Placeholder>` |   |

### setPlaceholders

Optional. List of custom placeholders in the prompt text.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Generator.Placeholder>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLlmModelSettings

The LLM model settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.LlmModelSettings|null` |   |

### hasLlmModelSettings

### clearLlmModelSettings

### setLlmModelSettings

The LLM model settings.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.LlmModelSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getModelParameter

Parameters passed to the LLM to configure its behavior.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Generator.ModelParameter|null` |   |

### hasModelParameter

### clearModelParameter

### setModelParameter

Parameters passed to the LLM to configure its behavior.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Generator.ModelParameter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |