Skip to main content

generators

Creates, updates, deletes, gets or lists a generators resource.

Overview

Namegenerators
TypeResource
Idgoogle.dialogflow.generators

Fields

NameDatatypeDescription
namestringThe unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: projects//locations//agents//generators/.
displayNamestringRequired. 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.
placeholdersarrayOptional. List of custom placeholders in the prompt text.
promptTextobjectText input which can be used for prompt or banned phrases.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_agents_generators_getSELECTagentsId, generatorsId, locationsId, projectsIdRetrieves the specified generator.
projects_locations_agents_generators_listSELECTagentsId, locationsId, projectsIdReturns the list of all generators in the specified agent.
projects_locations_agents_generators_createINSERTagentsId, locationsId, projectsIdCreates a generator in the specified agent.
projects_locations_agents_generators_deleteDELETEagentsId, generatorsId, locationsId, projectsIdDeletes the specified generators.
projects_locations_agents_generators_patchUPDATEagentsId, generatorsId, locationsId, projectsIdUpdate the specified generator.

SELECT examples

Returns the list of all generators in the specified agent.

SELECT
name,
displayName,
placeholders,
promptText
FROM google.dialogflow.generators
WHERE agentsId = '{{ agentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new generators resource.

/*+ create */
INSERT INTO google.dialogflow.generators (
agentsId,
locationsId,
projectsId,
name,
displayName,
promptText,
placeholders
)
SELECT
'{{ agentsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ promptText }}',
'{{ placeholders }}'
;

UPDATE example

Updates a generators resource.

/*+ update */
UPDATE google.dialogflow.generators
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
promptText = '{{ promptText }}',
placeholders = '{{ placeholders }}'
WHERE
agentsId = '{{ agentsId }}'
AND generatorsId = '{{ generatorsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified generators resource.

/*+ delete */
DELETE FROM google.dialogflow.generators
WHERE agentsId = '{{ agentsId }}'
AND generatorsId = '{{ generatorsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';