# Google Cloud Discovery Engine V1 Client - Class GenerationSpec (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class GenerationSpec.

Content generation specification.

Generated from protobuf message `google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GenerationSpec`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1 \\ GenerateGroundedContentRequest

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ model_id` | `string` Specifies which Vertex model id to use for generation. |
| `↳ language_code` | `string` Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). |
| `↳ temperature` | `float` If specified, custom value for the temperature will be used. |
| `↳ top_p` | `float` If specified, custom value for nucleus sampling will be used. |
| `↳ top_k` | `int` If specified, custom value for top-k sampling will be used. |
| `↳ frequency_penalty` | `float` If specified, custom value for frequency penalty will be used. |
| `↳ seed` | `int` If specified, custom value for the seed will be used. |
| `↳ presence_penalty` | `float` If specified, custom value for presence penalty will be used. |
| `↳ max_output_tokens` | `int` If specified, custom value for max output tokens will be used. |

### getModelId

Specifies which Vertex model id to use for generation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setModelId

Specifies which Vertex model id to use for generation.

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

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

### getLanguageCode

Language code for content. Use language tags defined by
[BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLanguageCode

Language code for content. Use language tags defined by
[BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).

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

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

### getTemperature

If specified, custom value for the temperature will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasTemperature

### clearTemperature

### setTemperature

If specified, custom value for the temperature will be used.

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

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

### getTopP

If specified, custom value for nucleus sampling will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasTopP

### clearTopP

### setTopP

If specified, custom value for nucleus sampling will be used.

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

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

### getTopK

If specified, custom value for top-k sampling will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasTopK

### clearTopK

### setTopK

If specified, custom value for top-k sampling will be used.

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

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

### getFrequencyPenalty

If specified, custom value for frequency penalty will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasFrequencyPenalty

### clearFrequencyPenalty

### setFrequencyPenalty

If specified, custom value for frequency penalty will be used.

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

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

### getSeed

If specified, custom value for the seed will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasSeed

### clearSeed

### setSeed

If specified, custom value for the seed will be used.

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

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

### getPresencePenalty

If specified, custom value for presence penalty will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasPresencePenalty

### clearPresencePenalty

### setPresencePenalty

If specified, custom value for presence penalty will be used.

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

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

### getMaxOutputTokens

If specified, custom value for max output tokens will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasMaxOutputTokens

### clearMaxOutputTokens

### setMaxOutputTokens

If specified, custom value for max output tokens will be used.

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

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