Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Example.
Example represents a sample execution of the playbook in the conversation.
An example consists of a list of ordered actions performed by end user or Dialogflow agent according the playbook instructions to fulfill the task.
Generated from protobuf message google.cloud.dialogflow.cx.v3.Example
Namespace
Google \ Cloud \ Dialogflow \ Cx \ V3Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The unique identifier of the playbook example. Format: |
↳ playbook_input |
PlaybookInput
Optional. The input to the playbook in the example. |
↳ playbook_output |
PlaybookOutput
Optional. The output of the playbook in the example. |
↳ actions |
array<Action>
Required. The ordered list of actions performed by the end user and the Dialogflow agent. |
↳ display_name |
string
Required. The display name of the example. |
↳ description |
string
Optional. The high level concise description of the example. The max number of characters is 200. |
↳ token_count |
int|string
Output only. Estimated number of tokes current example takes when sent to the LLM. |
↳ create_time |
Google\Protobuf\Timestamp
Output only. The timestamp of initial example creation. |
↳ update_time |
Google\Protobuf\Timestamp
Output only. Last time the example was updated. |
↳ conversation_state |
int
Required. Example's output state. |
↳ language_code |
string
Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents. |
getName
The unique identifier of the playbook example.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
The unique identifier of the playbook example.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPlaybookInput
Optional. The input to the playbook in the example.
| Returns | |
|---|---|
| Type | Description |
PlaybookInput|null |
|
hasPlaybookInput
clearPlaybookInput
setPlaybookInput
Optional. The input to the playbook in the example.
| Parameter | |
|---|---|
| Name | Description |
var |
PlaybookInput
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPlaybookOutput
Optional. The output of the playbook in the example.
| Returns | |
|---|---|
| Type | Description |
PlaybookOutput|null |
|
hasPlaybookOutput
clearPlaybookOutput
setPlaybookOutput
Optional. The output of the playbook in the example.
| Parameter | |
|---|---|
| Name | Description |
var |
PlaybookOutput
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getActions
Required. The ordered list of actions performed by the end user and the Dialogflow agent.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setActions
Required. The ordered list of actions performed by the end user and the Dialogflow agent.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Action>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDisplayName
Required. The display name of the example.
| Returns | |
|---|---|
| Type | Description |
string |
|
setDisplayName
Required. The display name of the example.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDescription
Optional. The high level concise description of the example. The max number of characters is 200.
| Returns | |
|---|---|
| Type | Description |
string |
|
setDescription
Optional. The high level concise description of the example. The max number of characters is 200.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTokenCount
Output only. Estimated number of tokes current example takes when sent to the LLM.
| Returns | |
|---|---|
| Type | Description |
int|string |
|
setTokenCount
Output only. Estimated number of tokes current example takes when sent to the LLM.
| Parameter | |
|---|---|
| Name | Description |
var |
int|string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCreateTime
Output only. The timestamp of initial example creation.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasCreateTime
clearCreateTime
setCreateTime
Output only. The timestamp of initial example creation.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUpdateTime
Output only. Last time the example was updated.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. Last time the example was updated.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getConversationState
Required. Example's output state.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type OutputState. |
setConversationState
Required. Example's output state.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type OutputState. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getLanguageCode
Optional. The language code of the example.
If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents.
| Returns | |
|---|---|
| Type | Description |
string |
|
setLanguageCode
Optional. The language code of the example.
If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|