0.6.0 (latest) 0.5.0 0.4.4 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Ces V1 Client class GoogleSearchTool.

Represents a tool to perform Google web searches for grounding.

See
<https://cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool#google-search>.

Generated from protobuf message `google.cloud.ces.v1.GoogleSearchTool`

## Namespace

Google \\ Cloud \\ Ces \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The name of the tool. |
| `↳ description` | `string` Optional. Description of the tool's purpose. |
| `↳ context_urls` | `string[]` Optional. Content will be fetched directly from these URLs for context and grounding. Example: "<https://example.com/path.html>". A maximum of 20 URLs are allowed. |
| `↳ preferred_domains` | `string[]` Optional. Specifies domains to restrict search results to. Example: "example.com", "another.site". A maximum of 20 domains can be specified. |
| `↳ exclude_domains` | `string[]` Optional. List of domains to be excluded from the search results. Example: "example.com". A maximum of 2000 domains can be excluded. |
| `↳ prompt_config` | `GoogleSearchTool\PromptConfig` Optional. Prompt instructions passed to planner on how the search results should be processed for text and voice. |

### getName

Required. The name of the tool.

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

### setName

Required. The name of the tool.

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

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

### getDescription

Optional. Description of the tool's purpose.

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

### setDescription

Optional. Description of the tool's purpose.

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

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

### getContextUrls

Optional. Content will be fetched directly from these URLs for context and
grounding. Example: "<https://example.com/path.html>". A maximum of 20 URLs
are allowed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setContextUrls

Optional. Content will be fetched directly from these URLs for context and
grounding. Example: "<https://example.com/path.html>". A maximum of 20 URLs
are allowed.

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

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

### getPreferredDomains

Optional. Specifies domains to restrict search results to.

Example: "example.com", "another.site". A maximum of 20 domains can be
specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setPreferredDomains

Optional. Specifies domains to restrict search results to.

Example: "example.com", "another.site". A maximum of 20 domains can be
specified.

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

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

### getExcludeDomains

Optional. List of domains to be excluded from the search results.

Example: "example.com".
A maximum of 2000 domains can be excluded.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setExcludeDomains

Optional. List of domains to be excluded from the search results.

Example: "example.com".
A maximum of 2000 domains can be excluded.

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

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

### getPromptConfig

Optional. Prompt instructions passed to planner on how the search results
should be processed for text and voice.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GoogleSearchTool\PromptConfig|null` |   |

### hasPromptConfig

### clearPromptConfig

### setPromptConfig

Optional. Prompt instructions passed to planner on how the search results
should be processed for text and voice.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `GoogleSearchTool\PromptConfig` |

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