examples
Creates, updates, deletes, gets or lists an examples
resource.
Overview
Name | examples |
Type | Resource |
Id | google.dialogflow.examples |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_agents_playbooks_examples_get
- projects_locations_agents_playbooks_examples_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the playbook example. Format: projects//locations//agents//playbooks//examples/ . |
actions | array | Required. The ordered list of actions performed by the end user and the Dialogflow agent. |
conversationState | string | Required. Example's output state. |
createTime | string (google-datetime) | Output only. The timestamp of initial example creation. |
description | string | Optional. The high level concise description of the example. The max number of characters is 200. |
displayName | string | Required. The display name of the example. |
languageCode | 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. |
playbookInput | object | Optional. The input to the playbook in the example. (id: GoogleCloudDialogflowCxV3PlaybookInput) |
playbookOutput | object | Optional. The output of the playbook in the example. (id: GoogleCloudDialogflowCxV3PlaybookOutput) |
tokenCount | string (int64) | Output only. Estimated number of tokes current example takes when sent to the LLM. |
updateTime | string (google-datetime) | Output only. Last time the example was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the playbook example. Format: projects//locations//agents//playbooks//examples/ . |
actions | array | Required. The ordered list of actions performed by the end user and the Dialogflow agent. |
conversationState | string | Required. Example's output state. |
createTime | string (google-datetime) | Output only. The timestamp of initial example creation. |
description | string | Optional. The high level concise description of the example. The max number of characters is 200. |
displayName | string | Required. The display name of the example. |
languageCode | 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. |
playbookInput | object | Optional. The input to the playbook in the example. (id: GoogleCloudDialogflowCxV3PlaybookInput) |
playbookOutput | object | Optional. The output of the playbook in the example. (id: GoogleCloudDialogflowCxV3PlaybookOutput) |
tokenCount | string (int64) | Output only. Estimated number of tokes current example takes when sent to the LLM. |
updateTime | string (google-datetime) | Output only. Last time the example was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_agents_playbooks_examples_get | select | projectsId , locationsId , agentsId , playbooksId , examplesId | Retrieves the specified example. | |
projects_locations_agents_playbooks_examples_list | select | projectsId , locationsId , agentsId , playbooksId | pageSize , pageToken , languageCode | Returns a list of examples in the specified playbook. |
projects_locations_agents_playbooks_examples_create | insert | projectsId , locationsId , agentsId , playbooksId | Creates an example in the specified playbook. | |
projects_locations_agents_playbooks_examples_patch | update | projectsId , locationsId , agentsId , playbooksId , examplesId | updateMask | Update the specified example. |
projects_locations_agents_playbooks_examples_delete | delete | projectsId , locationsId , agentsId , playbooksId , examplesId | Deletes the specified example. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
agentsId | string | |
examplesId | string | |
locationsId | string | |
playbooksId | string | |
projectsId | string | |
languageCode | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_agents_playbooks_examples_get
- projects_locations_agents_playbooks_examples_list
Retrieves the specified example.
SELECT
name,
actions,
conversationState,
createTime,
description,
displayName,
languageCode,
playbookInput,
playbookOutput,
tokenCount,
updateTime
FROM google.dialogflow.examples
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND playbooksId = '{{ playbooksId }}' -- required
AND examplesId = '{{ examplesId }}' -- required;
Returns a list of examples in the specified playbook.
SELECT
name,
actions,
conversationState,
createTime,
description,
displayName,
languageCode,
playbookInput,
playbookOutput,
tokenCount,
updateTime
FROM google.dialogflow.examples
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND playbooksId = '{{ playbooksId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND languageCode = '{{ languageCode }}';
INSERT
examples
- projects_locations_agents_playbooks_examples_create
- Manifest
Creates an example in the specified playbook.
INSERT INTO google.dialogflow.examples (
data__name,
data__playbookInput,
data__playbookOutput,
data__actions,
data__displayName,
data__description,
data__conversationState,
data__languageCode,
projectsId,
locationsId,
agentsId,
playbooksId
)
SELECT
'{{ name }}',
'{{ playbookInput }}',
'{{ playbookOutput }}',
'{{ actions }}',
'{{ displayName }}',
'{{ description }}',
'{{ conversationState }}',
'{{ languageCode }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ playbooksId }}'
RETURNING
name,
actions,
conversationState,
createTime,
description,
displayName,
languageCode,
playbookInput,
playbookOutput,
tokenCount,
updateTime
;
# Description fields are for documentation purposes
- name: examples
props:
- name: projectsId
value: string
description: Required parameter for the examples resource.
- name: locationsId
value: string
description: Required parameter for the examples resource.
- name: agentsId
value: string
description: Required parameter for the examples resource.
- name: playbooksId
value: string
description: Required parameter for the examples resource.
- name: name
value: string
description: >
The unique identifier of the playbook example. Format: `projects//locations//agents//playbooks//examples/`.
- name: playbookInput
value: object
description: >
Optional. The input to the playbook in the example.
- name: playbookOutput
value: object
description: >
Optional. The output of the playbook in the example.
- name: actions
value: array
description: >
Required. The ordered list of actions performed by the end user and the Dialogflow agent.
- name: displayName
value: string
description: >
Required. The display name of the example.
- name: description
value: string
description: >
Optional. The high level concise description of the example. The max number of characters is 200.
- name: conversationState
value: string
description: >
Required. Example's output state.
valid_values: ['OUTPUT_STATE_UNSPECIFIED', 'OUTPUT_STATE_OK', 'OUTPUT_STATE_CANCELLED', 'OUTPUT_STATE_FAILED', 'OUTPUT_STATE_ESCALATED', 'OUTPUT_STATE_PENDING']
- name: languageCode
value: string
description: >
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.
UPDATE
examples
- projects_locations_agents_playbooks_examples_patch
Update the specified example.
UPDATE google.dialogflow.examples
SET
data__name = '{{ name }}',
data__playbookInput = '{{ playbookInput }}',
data__playbookOutput = '{{ playbookOutput }}',
data__actions = '{{ actions }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__conversationState = '{{ conversationState }}',
data__languageCode = '{{ languageCode }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND playbooksId = '{{ playbooksId }}' --required
AND examplesId = '{{ examplesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
actions,
conversationState,
createTime,
description,
displayName,
languageCode,
playbookInput,
playbookOutput,
tokenCount,
updateTime;
DELETE
examples
- projects_locations_agents_playbooks_examples_delete
Deletes the specified example.
DELETE FROM google.dialogflow.examples
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND playbooksId = '{{ playbooksId }}' --required
AND examplesId = '{{ examplesId }}' --required;